﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    mc:Ignorable="d"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:svl="clr-namespace:WPFSoundVisualizationLib;assembly=WPFSoundVisualizationLib">

    <!-- Main Colors -->

    <Color x:Key="MainColor">#FF939393</Color>
    <Color x:Key="HoverColor">#FFAAAAAA</Color>
    <Color x:Key="DefaultColor">#FF9BB1C5</Color>
    <SolidColorBrush x:Key="LightBrush"
                     Color="#FFAFAFAF" />
    <SolidColorBrush x:Key="ShadeBrush"
                     Color="#FF9F9F9F" />

    <Color x:Key="TopGradientSelectColor">#FFFFFFFF</Color>
    <Color x:Key="BottomGradientSelectColor">#FF999999</Color>

    <Color x:Key="BlackColor">#FF000000</Color>
    <Color x:Key="WhiteColor">#FFFFFFFF</Color>

    <SolidColorBrush x:Key="TextBrush"
                     Color="#FF000000" />
    <SolidColorBrush x:Key="NormalBrush"
                     Color="{StaticResource MainColor}" />
    <SolidColorBrush x:Key="NormalBorderBrush"
                     Color="#FF9B9999" />
    <SolidColorBrush x:Key="HoverBrush"
                     Color="{StaticResource HoverColor}" />
    <SolidColorBrush x:Key="GlyphBrush"
                     Color="#FFFFFFFF" />

    <LinearGradientBrush x:Key="PressedBrush"
                         EndPoint="0.5,0.971"
                         StartPoint="0.5,0.042">
        <GradientStop Color="#4C000000"
                      Offset="0" />
        <GradientStop Color="#26FFFFFF"
                      Offset="1" />
        <GradientStop Color="#4C000000"
                      Offset="0.467" />
        <GradientStop Color="#26FFFFFF"
                      Offset="0.479" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalPressedBrush"
                         EndPoint="0.042,0.5"
                         StartPoint="0.971,0.5">
        <GradientStop Color="#4C000000"
                      Offset="0" />
        <GradientStop Color="#26FFFFFF"
                      Offset="1" />
        <GradientStop Color="#4C000000"
                      Offset="0.467" />
        <GradientStop Color="#26FFFFFF"
                      Offset="0.479" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="ControlBackgroundBrush"
                     Color="#FFD6D6D6" />

    <LinearGradientBrush x:Key="SelectedBackgroundBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource TopGradientSelectColor}"
                      Offset="0" />
        <GradientStop Color="{StaticResource BottomGradientSelectColor}"
                      Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="DisabledForegroundBrush"
                     Color="#888" />
    <SolidColorBrush x:Key="DisabledBackgroundBrush"
                     Color="#FFD4D4D4" />
    <SolidColorBrush x:Key="DisabledBorderBrush"
                     Color="#AAA" />
    <SolidColorBrush x:Key="WindowBackgroundBrush"
                     Color="#FFFFFFFF" />

    <!-- EXPRESSION COMMON VALUES -->

    <LinearGradientBrush x:Key="ShineBrush"
                         EndPoint="0.5,0.971"
                         StartPoint="0.5,0.042">
        <GradientStop Color="#59FFFFFF"
                      Offset="0" />
        <GradientStop Color="#00FFFFFF"
                      Offset="1" />
        <GradientStop Color="#26FFFFFF"
                      Offset="0.467" />
        <GradientStop Color="#00FFFFFF"
                      Offset="0.475" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalShineBrush"
                         EndPoint="0.042,0.5"
                         StartPoint="0.971,0.5">
        <GradientStop Color="#59FFFFFF"
                      Offset="0" />
        <GradientStop Color="#00FFFFFF"
                      Offset="1" />
        <GradientStop Color="#26FFFFFF"
                      Offset="0.467" />
        <GradientStop Color="#00FFFFFF"
                      Offset="0.475" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="HoverShineBrush"
                         EndPoint="0.5,0.971"
                         StartPoint="0.5,0.042">
        <GradientStop Color="#4CFFFFFF"
                      Offset="0" />
        <GradientStop Color="#26FFFFFF"
                      Offset="1" />
        <GradientStop Color="#26FFFFFF"
                      Offset="0.467" />
        <GradientStop Color="#00FFFFFF"
                      Offset="0.475" />
        <GradientStop Color="#00FFFFFF"
                      Offset="0.856" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalHoverShineBrush"
                         EndPoint="0.042,0.5"
                         StartPoint="0.971,0.5">
        <GradientStop Color="#4CFFFFFF"
                      Offset="0" />
        <GradientStop Color="#26FFFFFF"
                      Offset="1" />
        <GradientStop Color="#26FFFFFF"
                      Offset="0.467" />
        <GradientStop Color="#00FFFFFF"
                      Offset="0.475" />
        <GradientStop Color="#00FFFFFF"
                      Offset="0.856" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PressedBorderBrush"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#444"
                      Offset="0.0" />
        <GradientStop Color="#888"
                      Offset="1.0" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalPressedBorderBrush"
                         EndPoint="0,0"
                         StartPoint="1,0">
        <GradientStop Color="#444"
                      Offset="0.0" />
        <GradientStop Color="#888"
                      Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="DefaultedBorderBrush"
                     Color="{StaticResource DefaultColor}" />
    <SolidColorBrush x:Key="SolidBorderBrush"
                     Color="#888" />

    <!-- Region: WaveformTimeline -->
    <LinearGradientBrush x:Key="WaveformRightLevelBrush"
                         EndPoint="1,1"
                         StartPoint="1,0">
        <GradientStop Color="#D80303"
                      Offset="-1" />
        <GradientStop Color="#A80000"
                      Offset="0" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="WaveformLeftLevelBrush"
                         EndPoint="1,0"
                         StartPoint="1,1">
        <GradientStop Color="#D80303"
                      Offset="1" />
        <GradientStop Color="#A80000"
                      Offset="0" />
    </LinearGradientBrush>
    <Style TargetType="{x:Type svl:WaveformTimeline}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="RepeatRegionBrush"
                Value="#7FFFFFFF" />
        <Setter Property="TimelineTickBrush"
                Value="Gray" />
        <Setter Property="ProgressBarBrush"
                Value="Black" />
        <Setter Property="CenterLineBrush"
                Value="#595959" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="RightLevelBrush"
                Value="{StaticResource WaveformRightLevelBrush}" />
        <Setter Property="LeftLevelBrush"
                Value="{StaticResource WaveformLeftLevelBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type svl:WaveformTimeline}">
                    <Border Background="{StaticResource ControlBackgroundBrush}"
                            BorderBrush="DimGray"
                            BorderThickness="2"
                            CornerRadius="5">
                        <Border.Effect>
                            <DropShadowEffect BlurRadius="5"
                                              ShadowDepth="3"
                                              Color="Black"
                                              Opacity="0.15" />
                        </Border.Effect>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="20" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Canvas Name="PART_Waveform"
                                    Grid.Row="1"
                                    ClipToBounds="True" />
                            <Border BorderBrush="{TemplateBinding TimelineTickBrush}"
                                    Grid.Row="0"
                                    BorderThickness="0,0,0,1"
                                    Panel.ZIndex="0">
                                <Canvas Name="PART_Timeline"
                                        ClipToBounds="True"
                                        Height="20" />
                            </Border>
                            <Canvas Name="PART_Repeat"
                                    Grid.Row="1"
                                    ClipToBounds="True" />
                            <Canvas Name="PART_Progress"
                                    Grid.Row="0"
                                    Grid.RowSpan="2"
                                    ClipToBounds="True" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: WaveformTimeline -->

    <!-- Region: SpectrumAnalyzer -->
    <LinearGradientBrush x:Key="SpectrumBarBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="#950808"
                      Offset="0" />
        <GradientStop Color="#DA0303"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SpectrumPeakBrush"
                     Color="#F10202" />
    <Style TargetType="{x:Type svl:SpectrumAnalyzer}">
        <Setter Property="BarStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource SpectrumBarBrush}" />
                    <Setter Property="RadiusX"
                            Value="3" />
                    <Setter Property="RadiusY"
                            Value="3" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="PeakStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource SpectrumPeakBrush}" />
                    <Setter Property="RadiusX"
                            Value="3" />
                    <Setter Property="RadiusY"
                            Value="3" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type svl:SpectrumAnalyzer}">
                    <Border Background="{StaticResource ControlBackgroundBrush}"
                            BorderBrush="DimGray"
                            BorderThickness="2"
                            CornerRadius="5">
                        <Border.Effect>
                            <DropShadowEffect BlurRadius="5"
                                              ShadowDepth="3"
                                              Color="Black"
                                              Opacity="0.15" />
                        </Border.Effect>
                        <Canvas Name="PART_SpectrumCanvas"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                ClipToBounds="True" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: SpectrumAnalyzer -->

    <!-- Region: AlbumArtDisplay -->
    <Style TargetType="{x:Type svl:AlbumArtDisplay}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type svl:AlbumArtDisplay}">
                    <Grid>
                        <Image Name="PART_AlbumArt"
                               VerticalAlignment="Center"
                               HorizontalAlignment="Center"
                               Stretch="Uniform"
                               StretchDirection="Both"
                               RenderOptions.BitmapScalingMode="HighQuality">
                            <Image.Effect>
                                <DropShadowEffect BlurRadius="5"
                                                  ShadowDepth="3"
                                                  Color="Black"
                                                  Opacity="0.15" />
                            </Image.Effect>
                        </Image>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: AlbumArtDisplay-->

    <!-- Region: DigitalClock -->
    <Style TargetType="{x:Type svl:DigitalClock}">
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type svl:DigitalClock}">
                    <ControlTemplate.Resources>
                        <LinearGradientBrush x:Key="DigitBrush"
                                             EndPoint="0,0"
                                             StartPoint="0,1">
                            <GradientStop Color="#950808"
                                          Offset="0" />
                            <GradientStop Color="#DA0303"
                                          Offset="1" />
                        </LinearGradientBrush>

                        <LinearGradientBrush x:Key="EmptyBrush"
                                             EndPoint="0,0"
                                             StartPoint="0,1">
                            <GradientStop Color="#17950808"
                                          Offset="0" />
                            <GradientStop Color="#17DA0303"
                                          Offset="1" />
                        </LinearGradientBrush>

                        <Canvas x:Key="One"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Two"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Three"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Four"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Five"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Six"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Seven"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Eight"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Nine"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Zero"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <!-- Top -->
                            <Path Width="21.0747"
                                  Height="4.908"
                                  Canvas.Left="6.06254"
                                  Canvas.Top="3.09265"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 6.06254,3.21667L 10.8466,8.00065L 22.2319,8.00065L 27.1372,3.09265" />
                            <!-- Bottom -->
                            <Path Width="21.0413"
                                  Height="5.99866"
                                  Canvas.Left="4.07015"
                                  Canvas.Top="50.6036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 20.2835,50.6036L 8.96082,50.6036L 4.07015,55.4916C 4.99015,56.1929 6.11682,56.6023 7.29146,56.6023L 21.7861,56.6023C 23.0288,56.6023 24.1768,56.1529 25.1115,55.4303L 20.2835,50.6036 Z " />
                            <!-- Bottom Left -->
                            <Path Width="6.80794"
                                  Height="24.3027"
                                  Canvas.Left="1.99475"
                                  Canvas.Top="30.2454"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,30.2454L 2.82536,32.4161L 2,51.0721C 1.94267,52.3521 2.35734,53.5575 3.12801,54.5481L 8.07068,49.6068L 8.80269,33.1134L 5.39868,30.2454 Z " />
                            <!-- Top Left -->
                            <Path Width="6.78536"
                                  Height="24.344"
                                  Canvas.Left="3.08667"
                                  Canvas.Top="4.15731"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 5.39868,28.5013L 9.14669,25.3427L 9.87203,8.91333L 5.11735,4.15731C 4.43201,5.03064 3.99202,6.09998 3.94002,7.26534L 3.08667,26.5507L 5.39868,28.5013 Z " />
                            <!-- Top Right -->
                            <Path Width="6.80124"
                                  Height="24.2174"
                                  Canvas.Left="22.4299"
                                  Canvas.Top="4.03398"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,28.2513L 28.4085,26.0447L 29.2259,7.53133C 29.2832,6.24199 28.8672,5.02864 28.0833,4.03398L 23.1552,8.95931L 22.4299,25.4167L 25.7912,28.2513 Z " />
                            <!-- Bottom Right -->
                            <Path Width="6.79472"
                                  Height="24.5053"
                                  Canvas.Left="21.3512"
                                  Canvas.Top="29.9954"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 25.7912,29.9954L 22.0885,33.1168L 21.3512,49.7861L 26.0645,54.5008C 26.7752,53.6168 27.2366,52.5288 27.2886,51.3381L 28.1459,31.9808L 25.7912,29.9954 Z " />
                            <!-- Center -->
                            <Path Width="18.3254"
                                  Height="6"
                                  Canvas.Left="6.43201"
                                  Canvas.Top="26.2677"
                                  Stretch="Fill"
                                  Fill="{StaticResource EmptyBrush}"
                                  Data="F1 M 24.7574,29.1237L 21.3693,26.2677L 10.1174,26.2677L 6.43201,29.3744L 9.86536,32.2677L 21.028,32.2677L 24.7574,29.1237 Z " />
                        </Canvas>
                        <Canvas x:Key="Decimal"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <Path Width="4.55469"
                                  Height="4.55465"
                                  Canvas.Left="24.6767"
                                  Canvas.Top="52.0476"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 29.2314,54.3236C 29.2314,55.5809 28.21,56.6023 26.9527,56.6023C 25.6953,56.6023 24.6767,55.5809 24.6767,54.3236C 24.6767,53.0662 25.6953,52.0476 26.9527,52.0476C 28.21,52.0476 29.2314,53.0662 29.2314,54.3236 Z " />
                        </Canvas>
                        <Canvas x:Key="Colon"
                                Width="30"
                                Height="60"
                                Canvas.Left="0"
                                Canvas.Top="0">
                            <Path Width="4.55465"
                                  Height="4.55469"
                                  Canvas.Left="24.6089"
                                  Canvas.Top="19.6101"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 29.1636,21.8861C 29.1636,23.1435 28.1423,24.1648 26.8849,24.1648C 25.6276,24.1648 24.6089,23.1435 24.6089,21.8861C 24.6089,20.6288 25.6276,19.6101 26.8849,19.6101C 28.1423,19.6101 29.1636,20.6288 29.1636,21.8861 Z " />
                            <Path Width="4.55465"
                                  Height="4.55464"
                                  Canvas.Left="24.6753"
                                  Canvas.Top="35.1036"
                                  Stretch="Fill"
                                  Fill="{StaticResource DigitBrush}"
                                  Data="F1 M 29.23,37.3796C 29.23,38.6369 28.2087,39.6582 26.9513,39.6582C 25.694,39.6582 24.6753,38.6369 24.6753,37.3796C 24.6753,36.1223 25.694,35.1036 26.9513,35.1036C 28.2087,35.1036 29.23,36.1223 29.23,37.3796 Z " />
                        </Canvas>
                    </ControlTemplate.Resources>
                    <Border Background="{StaticResource ControlBackgroundBrush}"
                            BorderBrush="DimGray"
                            BorderThickness="2"
                            CornerRadius="5">
                        <Border.Effect>
                            <DropShadowEffect BlurRadius="5"
                                              ShadowDepth="3"
                                              Color="Black"
                                              Opacity="0.15" />
                        </Border.Effect>
                        <Viewbox Stretch="Uniform"
                                 VerticalAlignment="Center"
                                 HorizontalAlignment="Stretch">
                            <Grid Name="PART_ClockGrid"
                                  Margin="5,10,5,10" />
                        </Viewbox>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: DigitalClock -->

    <!-- Region: TimeEditor -->
    <Style TargetType="{x:Type svl:TimeEditor}">
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource ButtonBorderBrush}" />
        <Setter Property="CaretBrush"
                Value="{DynamicResource CaretBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type svl:TimeEditor}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <ControlTemplate TargetType="{x:Type TextBox}"
                                         x:Key="TimeEdtiorTextBoxTemplate">
                            <ScrollViewer Name="PART_ContentHost" />
                        </ControlTemplate>
                    </ControlTemplate.Resources>
                    <Grid Width="109"
                          Height="24"
                          Name="TimeEditorGrid">
                        <Border x:Name="Border"
                                Opacity="1"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2"
                                Background="{TemplateBinding Background}">
                            <Border BorderThickness="1">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="20" />
                                        <ColumnDefinition Width="3" />
                                        <ColumnDefinition Width="38" />
                                        <ColumnDefinition Width="20" />
                                    </Grid.ColumnDefinitions>

                                    <!-- Hours -->
                                    <Grid Width="23"
                                          Name="HoursGrid">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="20" />
                                            <ColumnDefinition Width="3" />
                                        </Grid.ColumnDefinitions>
                                        <TextBox Grid.Column="0"
                                                 Name="PART_HoursTextBox"
                                                 Text="{TemplateBinding Hours}"
                                                 TextAlignment="Right"
                                                 CaretBrush="{TemplateBinding CaretBrush}"
                                                 Template="{DynamicResource TimeEdtiorTextBoxTemplate}" />

                                        <TextBlock Text=":"
                                                   Name="HoursSeparator"
                                                   Grid.Column="1" />
                                    </Grid>

                                    <!-- Minutes -->
                                    <TextBox Grid.Column="1"
                                             Name="PART_MinutesTextBox"
                                             Text="{TemplateBinding Minutes}"
                                             TextAlignment="Right"
                                             CaretBrush="{TemplateBinding CaretBrush}"
                                             Template="{DynamicResource TimeEdtiorTextBoxTemplate}" />

                                    <TextBlock Text=":"
                                               Grid.Column="2" />

                                    <!-- Seconds -->
                                    <TextBox Grid.Column="3"
                                             Name="PART_SecondsTextBox"
                                             Text="{TemplateBinding Seconds}"
                                             TextAlignment="Left"
                                             CaretBrush="{TemplateBinding CaretBrush}"
                                             Template="{DynamicResource TimeEdtiorTextBoxTemplate}" />

                                    <Grid Grid.Column="4"
                                          VerticalAlignment="Stretch"
                                          HorizontalAlignment="Stretch">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="50*" />
                                            <RowDefinition Height="50*" />
                                        </Grid.RowDefinitions>

                                        <Button Name="PART_SpinUpButton"
                                                Grid.Row="0">
                                            <Button.Content>
                                                <Path Fill="Black"
                                                      Data="M 5,10 L 15,10 L 10,5 L 5,10"
                                                      Width="6"
                                                      Height="5"
                                                      Stretch="Fill" />
                                            </Button.Content>
                                        </Button>

                                        <Button Name="PART_SpinDownButton"
                                                Grid.Row="1">
                                            <Button.Content>
                                                <Path Fill="Black"
                                                      Data="M 5,5 L 10,10 L 15,5 L 5,5"
                                                      Width="6"
                                                      Height="5"
                                                      Stretch="Fill" />
                                            </Button.Content>
                                        </Button>
                                    </Grid>
                                </Grid>
                            </Border>
                        </Border>
                        <Border x:Name="HoverBorder"
                                IsHitTestVisible="False"
                                Opacity="0"
                                BorderBrush="{StaticResource GlyphBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2" />
                        <Border x:Name="FocusVisualElement"
                                IsHitTestVisible="False"
                                Opacity="0"
                                BorderBrush="{StaticResource HoverShineBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Background"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBorderBrush}" />
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                        <Trigger Property="NeedsHour"
                                 Value="False">
                            <Setter Property="Visibility"
                                    TargetName="HoursGrid"
                                    Value="Collapsed" />
                            <Setter Property="Width"
                                    TargetName="TimeEditorGrid"
                                    Value="86" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: TimeEditor -->

    <!-- Region: Equalizer -->
    <Style TargetType="{x:Type svl:Equalizer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type svl:Equalizer}">
                    <ControlTemplate.Resources>
                        <LinearGradientBrush x:Key="ActiveEqualizerBrush"
                                             EndPoint="0,0"
                                             StartPoint="0,1">
                            <GradientStop Color="#950808"
                                          Offset="0" />
                            <GradientStop Color="#DA0303"
                                          Offset="1" />
                        </LinearGradientBrush>
                        <Style x:Key="InactiveScrollRepeatButtonStyle"
                               d:IsControlPart="True"
                               TargetType="{x:Type RepeatButton}">
                            <Setter Property="Background"
                                    Value="Transparent" />
                            <Setter Property="BorderBrush"
                                    Value="Transparent" />
                            <Setter Property="IsTabStop"
                                    Value="false" />
                            <Setter Property="Focusable"
                                    Value="false" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                        <Grid Background="{TemplateBinding Background}">
                                            <Rectangle Fill="#99000000"
                                                       Height="6"
                                                       Stroke="{TemplateBinding BorderBrush}"
                                                       StrokeThickness="{TemplateBinding BorderThickness}" />
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                        <Style x:Key="ActiveScrollRepeatButtonStyle"
                               d:IsControlPart="True"
                               TargetType="{x:Type RepeatButton}">
                            <Setter Property="Background"
                                    Value="Transparent" />
                            <Setter Property="BorderBrush"
                                    Value="Transparent" />
                            <Setter Property="IsTabStop"
                                    Value="false" />
                            <Setter Property="Focusable"
                                    Value="false" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                        <Grid Background="{TemplateBinding Background}">
                                            <Rectangle Fill="{StaticResource ActiveEqualizerBrush}"
                                                       Height="6"
                                                       Stroke="{TemplateBinding BorderBrush}"
                                                       StrokeThickness="{TemplateBinding BorderThickness}" />
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                        <Style x:Key="EqualizerSliderThumb"
                               d:IsControlPart="True"
                               TargetType="{x:Type Thumb}">
                            <Setter Property="SnapsToDevicePixels"
                                    Value="true" />
                            <Setter Property="Height"
                                    Value="20" />
                            <Setter Property="Width"
                                    Value="30" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Thumb}">
                                        <ControlTemplate.Resources>
                                            <Storyboard x:Key="HoverOn">
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="HoverShineBorder"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                          Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="HoverBorder"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                          Value="1" />
                                                </DoubleAnimationUsingKeyFrames>

                                            </Storyboard>
                                            <Storyboard x:Key="HoverOff">
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="HoverShineBorder"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                                          Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="HoverBorder"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                                          Value="0" />
                                                </DoubleAnimationUsingKeyFrames>

                                            </Storyboard>
                                            <Storyboard x:Key="PressedOn">

                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="PressedBorder"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                          Value="1" />
                                                </DoubleAnimationUsingKeyFrames>

                                            </Storyboard>
                                            <Storyboard x:Key="PressedOff">

                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="PressedBorder"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                                          Value="0" />
                                                </DoubleAnimationUsingKeyFrames>

                                            </Storyboard>
                                            <Storyboard x:Key="FocusedOn">
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="FocusVisualElement"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                          Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                            <Storyboard x:Key="FocussedOff">
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                               Storyboard.TargetName="FocusVisualElement"
                                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                                          Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </ControlTemplate.Resources>
                                        <Grid>
                                            <Border x:Name="Background"
                                                    Background="{TemplateBinding Background}"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3" />
                                            <Border x:Name="HoverBorder"
                                                    Opacity="0"
                                                    Background="{StaticResource HoverBrush}"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3" />
                                            <Border x:Name="HoverShineBorder"
                                                    Opacity="0"
                                                    Background="{StaticResource VerticalHoverShineBrush}"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3" />
                                            <Border x:Name="PressedBorder"
                                                    Opacity="0"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3"
                                                    Background="{StaticResource VerticalPressedBrush}" />
                                            <Border x:Name="ShineBorder"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3"
                                                    Background="{StaticResource VerticalShineBrush}"
                                                    Opacity="1" />
                                            <Grid>
                                                <Canvas>
                                                    <Canvas Margin="1,0,0,0">
                                                        <Rectangle Width="1.5"
                                                                   Height="10"
                                                                   Fill="#11FFFFFF"
                                                                   Canvas.Left="9"
                                                                   Canvas.Top="5" />
                                                        <Rectangle Width="1.5"
                                                                   Height="10"
                                                                   Fill="#11FFFFFF"
                                                                   Canvas.Left="14"
                                                                   Canvas.Top="5" />
                                                        <Rectangle Width="1.5"
                                                                   Height="10"
                                                                   Fill="#11FFFFFF"
                                                                   Canvas.Left="19"
                                                                   Canvas.Top="5" />
                                                    </Canvas>
                                                    <Rectangle Width="1.5"
                                                               Height="10"
                                                               Fill="#66000000"
                                                               Canvas.Left="9"
                                                               Canvas.Top="5" />
                                                    <Rectangle Width="1.5"
                                                               Height="10"
                                                               Fill="#66000000"
                                                               Canvas.Left="14"
                                                               Canvas.Top="5" />
                                                    <Rectangle Width="1.5"
                                                               Height="10"
                                                               Fill="#66000000"
                                                               Canvas.Left="19"
                                                               Canvas.Top="5" />
                                                </Canvas>

                                            </Grid>
                                        </Grid>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsMouseOver"
                                                     Value="True">
                                                <Trigger.ExitActions>
                                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                                     x:Name="HoverOff_BeginStoryboard" />
                                                </Trigger.ExitActions>
                                                <Trigger.EnterActions>
                                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                                                </Trigger.EnterActions>
                                            </Trigger>
                                            <Trigger Property="IsDragging"
                                                     Value="True">
                                                <Trigger.ExitActions>
                                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                                     x:Name="PressedOff_BeginStoryboard" />
                                                </Trigger.ExitActions>
                                                <Trigger.EnterActions>
                                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                                     x:Name="PressedOn_BeginStoryboard" />
                                                </Trigger.EnterActions>
                                            </Trigger>
                                            <Trigger Property="IsEnabled"
                                                     Value="false">
                                                <Setter Property="Background"
                                                        TargetName="Background"
                                                        Value="{DynamicResource DisabledBackgroundBrush}" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Background"
                                    Value="{DynamicResource NormalBrush}" />
                            <Setter Property="BorderBrush"
                                    Value="{DynamicResource NormalBorderBrush}" />
                            <Setter Property="BorderThickness"
                                    Value="1,1,1,1" />
                        </Style>
                        <Style TargetType="{x:Type Slider}"
                               x:Key="EqualizerSlider">
                            <Setter Property="Background"
                                    Value="{DynamicResource NormalBrush}" />
                            <Setter Property="BorderBrush"
                                    Value="{DynamicResource NormalBorderBrush}" />
                            <Setter Property="Minimum"
                                    Value="-1.0" />
                            <Setter Property="Maximum"
                                    Value="1.0" />
                            <Setter Property="SmallChange"
                                    Value="0.01" />
                            <Setter Property="LargeChange"
                                    Value="0.1" />
                            <Setter Property="Orientation"
                                    Value="Vertical" />
                            <Setter Property="HorizontalAlignment"
                                    Value="Center" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Slider}">
                                        <Grid x:Name="GridRoot">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto"
                                                               MinHeight="{TemplateBinding MinHeight}" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <TickBar Visibility="Collapsed"
                                                     x:Name="TopTick"
                                                     Height="4"
                                                     SnapsToDevicePixels="True"
                                                     Placement="Top"
                                                     Fill="{DynamicResource GlyphBrush}" />
                                            <Border Grid.Row="1"
                                                    Margin="0"
                                                    x:Name="Border"
                                                    Height="4"
                                                    CornerRadius="2"
                                                    Background="{DynamicResource LightBrush}"
                                                    BorderBrush="{DynamicResource NormalBorderBrush}"
                                                    BorderThickness="1,1,1,1" />
                                            <Track Grid.Row="1"
                                                   x:Name="PART_Track">
                                                <Track.IncreaseRepeatButton>
                                                    <RepeatButton Style="{DynamicResource InactiveScrollRepeatButtonStyle}"
                                                                  Command="Slider.IncreaseLarge" />
                                                </Track.IncreaseRepeatButton>
                                                <Track.DecreaseRepeatButton>
                                                    <RepeatButton Style="{DynamicResource ActiveScrollRepeatButtonStyle}"
                                                                  Command="Slider.DecreaseLarge" />
                                                </Track.DecreaseRepeatButton>
                                                <Track.Thumb>
                                                    <Thumb Style="{DynamicResource EqualizerSliderThumb}"
                                                           Background="{DynamicResource NormalBrush}"
                                                           Foreground="{x:Null}" />

                                                </Track.Thumb>
                                            </Track>
                                            <TickBar Visibility="Collapsed"
                                                     Grid.Row="2"
                                                     x:Name="BottomTick"
                                                     Height="4"
                                                     SnapsToDevicePixels="True"
                                                     Placement="Bottom"
                                                     Fill="{TemplateBinding Foreground}" />
                                        </Grid>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="TickPlacement"
                                                     Value="TopLeft">
                                                <Setter Property="Visibility"
                                                        Value="Visible"
                                                        TargetName="TopTick" />
                                            </Trigger>
                                            <Trigger Property="TickPlacement"
                                                     Value="BottomRight">
                                                <Setter Property="Visibility"
                                                        Value="Visible"
                                                        TargetName="BottomTick" />
                                            </Trigger>
                                            <Trigger Property="TickPlacement"
                                                     Value="Both">
                                                <Setter Property="Visibility"
                                                        Value="Visible"
                                                        TargetName="TopTick" />
                                                <Setter Property="Visibility"
                                                        Value="Visible"
                                                        TargetName="BottomTick" />
                                            </Trigger>
                                            <Trigger Property="IsEnabled"
                                                     Value="false">
                                                <Setter Property="Background"
                                                        Value="{DynamicResource DisabledBackgroundBrush}"
                                                        TargetName="Border" />
                                                <Setter Property="BorderBrush"
                                                        Value="{DynamicResource DisabledBorderBrush}"
                                                        TargetName="Border" />
                                            </Trigger>
                                            <Trigger Property="Orientation"
                                                     Value="Vertical">
                                                <Setter Property="LayoutTransform"
                                                        TargetName="GridRoot">
                                                    <Setter.Value>
                                                        <RotateTransform Angle="-90" />
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter TargetName="PART_Track"
                                                        Property="Orientation"
                                                        Value="Horizontal" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </ControlTemplate.Resources>
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid Name="MainGrid">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="30" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <TextBlock Name="LowText"
                                       Foreground="{StaticResource TextBrush}"
                                       Text="Low"
                                       Margin="10,2,2,2"
                                       HorizontalAlignment="Left" />
                            <TextBlock Name="MidText"
                                       Foreground="{StaticResource TextBrush}"
                                       Text="Mid"
                                       Margin="2"
                                       HorizontalAlignment="Center" />
                            <TextBlock Name="HighText"
                                       Foreground="{StaticResource TextBrush}"
                                       Text="High"
                                       Margin="2,2,10,2"
                                       HorizontalAlignment="Right" />
                            <Grid Name="PART_EqualizerGrid"
                                  Grid.Row="1" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: Equalizer -->

    <Style x:Key="NuclearButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="2"
                                   Stroke="#60000000"
                                   StrokeThickness="1"
                                   StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Button}"
           BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource ButtonTemplate}" />
    </Style>

    <ControlTemplate x:Key="ButtonTemplate"
                     TargetType="{x:Type Button}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverShineBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>

            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverShineBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>

            </Storyboard>
            <Storyboard x:Key="PressedOn">

                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="PressedBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>

            </Storyboard>
            <Storyboard x:Key="PressedOff">

                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="PressedBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>

            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocussedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>

        </ControlTemplate.Resources>
        <Grid x:Name="Grid">
            <Border x:Name="Background"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3" />
            <Border x:Name="HoverBorder"
                    Opacity="0"
                    Background="{StaticResource HoverBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3" />
            <Border x:Name="HoverShineBorder"
                    Opacity="0"
                    Background="{StaticResource HoverShineBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3" />
            <Border x:Name="PressedBorder"
                    Opacity="0"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3"
                    Background="{StaticResource PressedBrush}" />
            <Border x:Name="ShineBorder"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3"
                    Background="{StaticResource ShineBrush}"
                    Opacity="1" />
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              RecognizesAccessKey="True" />
            <Border x:Name="FocusVisualElement"
                    IsHitTestVisible="false"
                    BorderBrush="{StaticResource HoverShineBrush}"
                    BorderThickness="1"
                    CornerRadius="3,3,3,3"
                    Margin="1,1,1,1"
                    Opacity="0" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsDefault"
                     Value="True">
                <Setter Property="BorderBrush"
                        TargetName="ShineBorder"
                        Value="{DynamicResource DefaultedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsKeyboardFocused"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocussedOff}"
                                     x:Name="FocussedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                     x:Name="FocusedOn_BeginStoryboard" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                     x:Name="HoverOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsPressed"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="true" />
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Background"
                        Value="{DynamicResource DisabledBackgroundBrush}"
                        TargetName="Background" />
                <Setter Property="BorderBrush"
                        Value="{DynamicResource DisabledBorderBrush}"
                        TargetName="ShineBorder" />
                <Setter Property="Opacity"
                        TargetName="Grid"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="RadioButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="15,0,0,0"
                                   Stroke="#60000000"
                                   StrokeThickness="1"
                                   StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CheckBoxFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="15,0,0,0"
                                   Stroke="#60000000"
                                   StrokeThickness="1"
                                   StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource CheckBoxTemplate}" />
    </Style>

    <ControlTemplate x:Key="CheckBoxTemplate"
                     TargetType="{x:Type CheckBox}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="BackgroundOverlay"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="BackgroundOverlay"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="PressedRectangle"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="PressedRectangle"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedTrue">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedFalse">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="IndeterminateOn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="IndeterminateOff">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocussedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="ContentFocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocussedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="ContentFocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <BulletDecorator Background="Transparent"
                         x:Name="bulletDecorator">
            <BulletDecorator.Bullet>
                <Grid Width="16"
                      Height="16">
                    <Rectangle Height="14"
                               Margin="1"
                               x:Name="Background"
                               Width="14"
                               Fill="{TemplateBinding Background}"
                               Stroke="{TemplateBinding BorderBrush}"
                               StrokeThickness="{TemplateBinding BorderThickness}" />
                    <Rectangle Height="14"
                               Margin="1"
                               x:Name="BackgroundOverlay"
                               Width="14"
                               Opacity="0"
                               Fill="{x:Null}"
                               Stroke="{StaticResource HoverBrush}"
                               StrokeThickness="2" />
                    <Rectangle Height="16"
                               x:Name="PressedRectangle"
                               Width="16"
                               IsHitTestVisible="false"
                               Opacity="0"
                               Stroke="{StaticResource HoverBrush}"
                               StrokeThickness="1" />
                    <Path Height="10"
                          Margin="1,1,0,1.5"
                          x:Name="CheckIcon"
                          Width="10.5"
                          Opacity="0"
                          Fill="{StaticResource GlyphBrush}"
                          Stretch="Fill"
                          Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z" />
                    <Rectangle Height="8"
                               x:Name="IndeterminateIcon"
                               Width="10"
                               Opacity="0"
                               Fill="{StaticResource GlyphBrush}" />
                    <Rectangle Height="14"
                               x:Name="DisabledVisualElement"
                               Width="14"
                               Opacity="0"
                               Fill="{StaticResource DisabledBackgroundBrush}" />
                    <Rectangle Height="16"
                               x:Name="ContentFocusVisualElement"
                               Width="16"
                               IsHitTestVisible="false"
                               Opacity="0"
                               Stroke="{StaticResource HoverShineBrush}"
                               StrokeThickness="1" />
                    <Rectangle Height="12"
                               x:Name="ShineRectangle"
                               Width="14"
                               IsHitTestVisible="false"
                               Opacity="1"
                               Stroke="{x:Null}"
                               StrokeThickness="1"
                               Fill="{StaticResource ShineBrush}"
                               Margin="2,2,2,2" />
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter RecognizesAccessKey="True"
                              Margin="5,0,0,0"
                              VerticalAlignment="Top"
                              HorizontalAlignment="Left" />
        </BulletDecorator>
        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocussedOff}"
                                     x:Name="FocussedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocussedOn}"
                                     x:Name="FocussedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsChecked"
                               Value="True" />
                    <Condition Property="IsThreeState"
                               Value="True" />
                </MultiTrigger.Conditions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard x:Name="ThreeStateOn_BeginStoryboard"
                                     Storyboard="{StaticResource CheckedFalse}" />
                </MultiTrigger.EnterActions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard x:Name="ThreeStateOff_BeginStoryboard"
                                     Storyboard="{StaticResource CheckedTrue}" />
                </MultiTrigger.ExitActions>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsChecked"
                               Value="{x:Null}" />
                    <Condition Property="IsThreeState"
                               Value="True" />
                </MultiTrigger.Conditions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard x:Name="ThreeStateOn1_BeginStoryboard"
                                     Storyboard="{StaticResource IndeterminateOn}" />
                </MultiTrigger.EnterActions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard x:Name="ThreeStateOff1_BeginStoryboard"
                                     Storyboard="{StaticResource IndeterminateOff}" />
                </MultiTrigger.ExitActions>
                <Setter Property="Visibility"
                        TargetName="CheckIcon"
                        Value="Hidden" />
            </MultiTrigger>
            <Trigger Property="IsChecked"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource CheckedFalse}"
                                     x:Name="CheckedTrue_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="CheckedTrue_BeginStoryboard1"
                                     Storyboard="{StaticResource CheckedTrue}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                </Trigger.ExitActions>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Fill"
                        Value="{DynamicResource DisabledBackgroundBrush}"
                        TargetName="Background" />
                <Setter Property="Stroke"
                        Value="{DynamicResource DisabledBorderBrush}"
                        TargetName="Background" />
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Opacity"
                        TargetName="bulletDecorator"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource RadioButtonFocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource RadioButtonTemplate}" />
        <Style.Triggers>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="RadioButtonTemplate"
                     TargetType="{x:Type RadioButton}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="BackgroundOverlay"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="BackgroundOverlay"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="PressedEllipse"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="PressedEllipse"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedOn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedOff">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocussedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="ContentFocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocussedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="ContentFocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <BulletDecorator Background="Transparent"
                         x:Name="bulletDecorator">
            <BulletDecorator.Bullet>
                <Grid Width="16"
                      Height="16">
                    <Ellipse Height="14"
                             Margin="1"
                             x:Name="Background"
                             Width="14"
                             Fill="{TemplateBinding Background}"
                             Stroke="{TemplateBinding BorderBrush}"
                             StrokeThickness="{TemplateBinding BorderThickness}" />
                    <Ellipse Height="14"
                             Margin="1"
                             x:Name="BackgroundOverlay"
                             Width="14"
                             StrokeThickness="2"
                             Stroke="{StaticResource HoverBrush}"
                             Opacity="0" />
                    <Ellipse Height="14"
                             Margin="1"
                             x:Name="PressedEllipse"
                             Width="14"
                             StrokeThickness="{TemplateBinding BorderThickness}"
                             Stroke="{StaticResource HoverBrush}"
                             Opacity="0" />
                    <Ellipse Height="6"
                             x:Name="CheckIcon"
                             Width="6"
                             Opacity="0"
                             Fill="{StaticResource GlyphBrush}" />
                    <Ellipse Height="14"
                             x:Name="DisabledVisualElement"
                             Width="14"
                             Opacity="0"
                             Fill="{StaticResource DisabledBackgroundBrush}" />
                    <Ellipse Height="16"
                             x:Name="ContentFocusVisualElement"
                             Width="16"
                             IsHitTestVisible="false"
                             Opacity="0"
                             Stroke="{StaticResource HoverShineBrush}"
                             StrokeThickness="1" />
                    <Ellipse Height="12"
                             Margin="2,2,2,2"
                             x:Name="ShineEllipse"
                             Width="12"
                             StrokeThickness="{TemplateBinding BorderThickness}"
                             Stroke="{x:Null}"
                             Fill="{StaticResource ShineBrush}" />
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter RecognizesAccessKey="True"
                              Margin="5,0,0,0" />
        </BulletDecorator>
        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocussedOff}"
                                     x:Name="FocussedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocussedOn}"
                                     x:Name="FocussedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="false">

                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard"
                                     Storyboard="{StaticResource CheckedOn}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard"
                                     Storyboard="{StaticResource CheckedOff}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsChecked"
                     Value="True" />
            <Trigger Property="IsMouseOver"
                     Value="true">

                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="HoverOff_BeginStoryboard"
                                     Storyboard="{StaticResource HoverOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsPressed"
                     Value="true">

                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="PressedOff_BeginStoryboard"
                                     Storyboard="{StaticResource PressedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="PressedOn_BeginStoryboard"
                                     Storyboard="{StaticResource PressedOn}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Fill"
                        TargetName="Background"
                        Value="{DynamicResource DisabledBackgroundBrush}" />
                <Setter Property="Stroke"
                        TargetName="Background"
                        Value="{DynamicResource DisabledBorderBrush}" />
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Opacity"
                        TargetName="bulletDecorator"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style d:IsControlPart="True"
           TargetType="{x:Type RepeatButton}"
           BasedOn="{x:Null}">
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="ContentPresenter"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.8" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="ContentPresenter"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0.3" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="ContentPresenter"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="ContentPresenter"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0.3" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="Border"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Opacity="1" />
                        <ContentPresenter HorizontalAlignment="Center"
                                          x:Name="ContentPresenter"
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                          Opacity="0.3"
                                          Height="Auto" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true" />
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Opacity"
                                    TargetName="ContentPresenter"
                                    Value="0.1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearThumbStyle"
           d:IsControlPart="True"
           TargetType="{x:Type Thumb}"
           BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.8" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0.3" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0.3" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Margin="0,0,0,0"
                          x:Name="Grid">
                        <Rectangle HorizontalAlignment="Stretch"
                                   x:Name="HoverRectangle"
                                   VerticalAlignment="Stretch"
                                   Width="Auto"
                                   Height="Auto"
                                   RadiusX="3"
                                   RadiusY="4"
                                   Stroke="{x:Null}"
                                   Margin="4.5,-2,4.5,-2"
                                   Opacity="0.3"
                                   MinHeight="10">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle HorizontalAlignment="Stretch"
                                   x:Name="PressedRectangle"
                                   VerticalAlignment="Stretch"
                                   Width="Auto"
                                   Height="Auto"
                                   RadiusX="3"
                                   RadiusY="4"
                                   Stroke="{x:Null}"
                                   Margin="4.5,-2,4.5,-2"
                                   Opacity="0.3"
                                   MinHeight="10">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True" />
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Opacity"
                                    TargetName="Grid"
                                    Value="0.1" />
                        </Trigger>
                        <Trigger Property="IsDragging"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearScrollRepeatButtonStyle"
           d:IsControlPart="True"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="IsTabStop"
                Value="false" />
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Grid>
                        <Rectangle Fill="{TemplateBinding Background}"
                                   Stroke="{TemplateBinding BorderBrush}"
                                   StrokeThickness="{TemplateBinding BorderThickness}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="false" />
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid x:Name="GridRoot"
                          Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                          Background="{DynamicResource NormalBrush}">
                        <Grid.RowDefinitions>
                            <RowDefinition MaxHeight="18" />
                            <RowDefinition Height="0.00001*" />
                            <RowDefinition MaxHeight="18" />
                        </Grid.RowDefinitions>
                        <RepeatButton x:Name="DecreaseRepeat"
                                      Command="ScrollBar.LineUpCommand"
                                      Background="{x:Null}"
                                      BorderBrush="{x:Null}"
                                      Foreground="{x:Null}">
                            <Grid Margin="0,0,0,0">
                                <Path Margin="4.742,3.997,4.946,5.327"
                                      VerticalAlignment="Stretch"
                                      Height="Auto"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Stretch="Fill"
                                      Stroke="{DynamicResource GlyphBrush}"
                                      StrokeThickness="1"
                                      Data="M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z"
                                      x:Name="DecreaseArrow" />
                            </Grid>
                        </RepeatButton>
                        <Track Grid.Row="1"
                               x:Name="PART_Track"
                               Orientation="Vertical"
                               IsDirectionReversed="true">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource NuclearThumbStyle}"
                                       Background="{x:Null}"
                                       Foreground="{x:Null}" />
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton x:Name="PageUp"
                                              Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="ScrollBar.PageDownCommand" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton x:Name="PageDown"
                                              Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="ScrollBar.PageUpCommand" />
                            </Track.DecreaseRepeatButton>
                        </Track>
                        <RepeatButton Grid.Row="2"
                                      x:Name="IncreaseRepeat"
                                      Command="ScrollBar.LineDownCommand">
                            <Grid>
                                <Path Margin="4.742,3.997,4.946,5.327"
                                      x:Name="IncreaseArrow"
                                      VerticalAlignment="Stretch"
                                      Height="Auto"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Stretch="Fill"
                                      Stroke="{DynamicResource GlyphBrush}"
                                      StrokeThickness="1"
                                      Data="M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z"
                                      RenderTransformOrigin="0.5,0.5">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1"
                                                            ScaleY="1" />
                                            <SkewTransform AngleX="0"
                                                           AngleY="0" />
                                            <RotateTransform Angle="180" />
                                            <TranslateTransform X="0"
                                                                Y="0" />
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                        </RepeatButton>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation"
                                 Value="Horizontal">
                            <Setter Property="LayoutTransform"
                                    TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="PART_Track"
                                    Property="Orientation"
                                    Value="Vertical" />
                            <Setter Property="Command"
                                    Value="ScrollBar.LineLeftCommand"
                                    TargetName="DecreaseRepeat" />
                            <Setter Property="Command"
                                    Value="ScrollBar.LineRightCommand"
                                    TargetName="IncreaseRepeat" />
                            <Setter Property="Command"
                                    Value="ScrollBar.PageLeftCommand"
                                    TargetName="PageDown" />
                            <Setter Property="Command"
                                    Value="ScrollBar.PageRightCommand"
                                    TargetName="PageUp" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearScrollViewer"
           TargetType="{x:Type ScrollViewer}"
           BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ScrollContentPresenter Grid.Column="0"
                                                Grid.Row="0"
                                                Margin="{TemplateBinding Padding}"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                CanContentScroll="{TemplateBinding CanContentScroll}" />
                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                   Grid.Column="0"
                                   Grid.Row="1"
                                   x:Name="PART_HorizontalScrollBar"
                                   Orientation="Horizontal"
                                   Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                   ViewportSize="{TemplateBinding ViewportWidth}"
                                   Minimum="0"
                                   Maximum="{TemplateBinding ScrollableWidth}"
                                   AutomationProperties.AutomationId="HorizontalScrollBar" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Grid.Column="1"
                                   Grid.Row="0"
                                   x:Name="PART_VerticalScrollBar"
                                   Orientation="Vertical"
                                   Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                   Minimum="0"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   AutomationProperties.AutomationId="VerticalScrollBar" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ListBox}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="Background"
                Value="{StaticResource ControlBackgroundBrush}" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9"
                                  Offset="0" />
                    <GradientStop Color="#FF8399A9"
                                  Offset="0.375" />
                    <GradientStop Color="#FF718597"
                                  Offset="0.375" />
                    <GradientStop Color="#FF617584"
                                  Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Grid>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2"
                                Background="{DynamicResource ControlBackgroundBrush}" />
                        <ScrollViewer Margin="1"
                                      Style="{DynamicResource NuclearScrollViewer}"
                                      Focusable="false"
                                      Background="{x:Null}">
                            <StackPanel Margin="1,1,1,1"
                                        IsItemsHost="true" />
                        </ScrollViewer>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Background"
                                    Value="{DynamicResource DisabledBackgroundBrush}"
                                    TargetName="Border" />
                            <Setter Property="BorderBrush"
                                    Value="{DynamicResource DisabledBorderBrush}"
                                    TargetName="Border" />
                        </Trigger>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style d:IsControlPart="True"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="HoverOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="FocussedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocussedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="true"
                          Margin="1,1,1,1">
                        <Rectangle x:Name="Background"
                                   IsHitTestVisible="False"
                                   Opacity="0.25"
                                   Fill="{StaticResource NormalBrush}"
                                   RadiusX="1"
                                   RadiusY="1" />
                        <Rectangle x:Name="HoverRectangle"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   Fill="{StaticResource NormalBrush}"
                                   RadiusX="1"
                                   RadiusY="1" />
                        <Rectangle x:Name="SelectedRectangle"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   Fill="{StaticResource SelectedBackgroundBrush}"
                                   RadiusX="1"
                                   RadiusY="1" />
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Margin="5,2,0,2"
                                          x:Name="contentPresenter" />
                        <Rectangle x:Name="FocusVisualElement"
                                   Stroke="{StaticResource HoverShineBrush}"
                                   StrokeThickness="1"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocussedOff}"
                                                 x:Name="FocussedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocussedOn}"
                                                 x:Name="FocussedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsSelected"
                                 Value="true">

                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="SelectedOff_BeginStoryboard"
                                                 Storyboard="{StaticResource SelectedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="SelectedOn_BeginStoryboard"
                                                 Storyboard="{StaticResource SelectedOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="Selector.IsSelected"
                                           Value="False" />
                            </MultiTrigger.Conditions>

                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard"
                                                 Storyboard="{StaticResource HoverOff}" />
                            </MultiTrigger.ExitActions>

                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected"
                     Value="True">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource BlackColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="ExpanderHeaderFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle SnapsToDevicePixels="true"
                                   Margin="0"
                                   Stroke="Black"
                                   StrokeDashArray="1 2"
                                   StrokeThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ExpanderDownHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border Padding="{TemplateBinding Padding}"
                            Background="{DynamicResource NormalBrush}"
                            BorderBrush="{DynamicResource NormalBorderBrush}"
                            BorderThickness="1,1,1,1"
                            CornerRadius="2,2,2,2">
                        <Grid SnapsToDevicePixels="False"
                              Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Margin="2,2,2,2"
                                       x:Name="Rectangle"
                                       Fill="{DynamicResource NormalBrush}"
                                       Stroke="{DynamicResource NormalBorderBrush}"
                                       StrokeThickness="1"
                                       RadiusX="1"
                                       RadiusY="1" />
                            <Rectangle Margin="2,2,2,2"
                                       x:Name="ShineRectangle"
                                       Fill="{DynamicResource ShineBrush}"
                                       Stroke="{DynamicResource NormalBorderBrush}"
                                       StrokeThickness="1"
                                       RadiusX="1"
                                       RadiusY="1" />
                            <Rectangle Margin="2,2,2,2"
                                       x:Name="HoverRectangle"
                                       Fill="{DynamicResource HoverBrush}"
                                       Stroke="{DynamicResource NormalBorderBrush}"
                                       StrokeThickness="1"
                                       RadiusX="1"
                                       RadiusY="1"
                                       Opacity="0" />
                            <Rectangle Margin="2,2,2,2"
                                       x:Name="HoverShineRectangle"
                                       Fill="{DynamicResource HoverShineBrush}"
                                       Stroke="{DynamicResource NormalBorderBrush}"
                                       StrokeThickness="1"
                                       RadiusX="1"
                                       RadiusY="1"
                                       Opacity="0" />
                            <Rectangle Margin="2,2,2,2"
                                       x:Name="PressedRectangle"
                                       Fill="{DynamicResource PressedBrush}"
                                       Stroke="{DynamicResource PressedBorderBrush}"
                                       StrokeThickness="1"
                                       RadiusX="1"
                                       RadiusY="1"
                                       Opacity="0" />
                            <Path HorizontalAlignment="Center"
                                  x:Name="Up_Arrow"
                                  VerticalAlignment="Center"
                                  Fill="{DynamicResource GlyphBrush}"
                                  Data="M 0 0 L 4 4 L 8 0 Z" />
                            <Path Visibility="Collapsed"
                                  HorizontalAlignment="Center"
                                  x:Name="Down_Arrow"
                                  VerticalAlignment="Center"
                                  Fill="{DynamicResource GlyphBrush}"
                                  Data="M 0 4 L 4 0 L 8 4 Z" />
                            <ContentPresenter SnapsToDevicePixels="True"
                                              HorizontalAlignment="Left"
                                              Margin="4,2,0,2"
                                              VerticalAlignment="Center"
                                              Grid.Column="1"
                                              RecognizesAccessKey="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="Down_Arrow"
                                    Value="Visible" />
                            <Setter Property="Visibility"
                                    TargetName="Up_Arrow"
                                    Value="Collapsed" />

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderRightHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border Padding="{TemplateBinding Padding}"
                            Background="{DynamicResource NormalBrush}"
                            BorderBrush="{DynamicResource NormalBorderBrush}"
                            BorderThickness="1,1,1,1"
                            CornerRadius="2,2,2,2">
                        <Grid SnapsToDevicePixels="False"
                              Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="-90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="Rectangle"
                                           Fill="{DynamicResource NormalBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="ShineRectangle"
                                           Fill="{DynamicResource ShineBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="HoverRectangle"
                                           Fill="{DynamicResource HoverBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="HoverShineRectangle"
                                           Fill="{DynamicResource HoverShineBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="PressedRectangle"
                                           Fill="{DynamicResource PressedBrush}"
                                           Stroke="{DynamicResource PressedBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Path HorizontalAlignment="Center"
                                      x:Name="Up_Arrow"
                                      VerticalAlignment="Center"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Data="M 0 0 L 4 4 L 8 0 Z" />
                                <Path Visibility="Collapsed"
                                      HorizontalAlignment="Center"
                                      x:Name="Down_Arrow"
                                      VerticalAlignment="Center"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Data="M 0 4 L 4 0 L 8 4 Z" />
                            </Grid>
                            <ContentPresenter SnapsToDevicePixels="True"
                                              HorizontalAlignment="Center"
                                              Margin="2,4,4,0"
                                              VerticalAlignment="Top"
                                              Grid.Row="1"
                                              RecognizesAccessKey="True">
                                <ContentPresenter.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="-90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </ContentPresenter.LayoutTransform>
                            </ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="Up_Arrow"
                                    Value="Collapsed" />
                            <Setter Property="Visibility"
                                    TargetName="Down_Arrow"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderUpHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border Padding="{TemplateBinding Padding}"
                            CornerRadius="2,2,2,2"
                            BorderThickness="1,1,1,1"
                            Background="{DynamicResource NormalBrush}"
                            BorderBrush="{DynamicResource NormalBorderBrush}">
                        <Grid SnapsToDevicePixels="False"
                              Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="180" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="Rectangle"
                                           Fill="{DynamicResource NormalBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="ShineRectangle"
                                           Fill="{DynamicResource ShineBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="HoverRectangle"
                                           Fill="{DynamicResource HoverBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="HoverShineRectangle"
                                           Fill="{DynamicResource HoverShineBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="PressedRectangle"
                                           Fill="{DynamicResource PressedBrush}"
                                           Stroke="{DynamicResource PressedBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Path HorizontalAlignment="Center"
                                      x:Name="Up_Arrow"
                                      VerticalAlignment="Center"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Data="M 0 0 L 4 4 L 8 0 Z" />
                                <Path Visibility="Collapsed"
                                      HorizontalAlignment="Center"
                                      x:Name="Down_Arrow"
                                      VerticalAlignment="Center"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Data="M 0 4 L 4 0 L 8 4 Z" />
                            </Grid>
                            <ContentPresenter SnapsToDevicePixels="True"
                                              HorizontalAlignment="Left"
                                              Margin="4,2,0,2"
                                              VerticalAlignment="Center"
                                              Grid.Column="1"
                                              RecognizesAccessKey="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="Up_Arrow"
                                    Value="Collapsed" />
                            <Setter Property="Visibility"
                                    TargetName="Down_Arrow"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderLeftHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border Padding="{TemplateBinding Padding}"
                            CornerRadius="2,2,2,2"
                            Background="{DynamicResource NormalBrush}"
                            BorderBrush="{DynamicResource NormalBorderBrush}"
                            BorderThickness="1,1,1,1">
                        <Grid SnapsToDevicePixels="False"
                              Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="Rectangle"
                                           Fill="{DynamicResource NormalBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="ShineRectangle"
                                           Fill="{DynamicResource ShineBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="HoverRectangle"
                                           Fill="{DynamicResource HoverBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="HoverShineRectangle"
                                           Fill="{DynamicResource HoverShineBrush}"
                                           Stroke="{DynamicResource NormalBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Rectangle Margin="2,2,2,2"
                                           x:Name="PressedRectangle"
                                           Fill="{DynamicResource PressedBrush}"
                                           Stroke="{DynamicResource PressedBorderBrush}"
                                           StrokeThickness="1"
                                           RadiusX="1"
                                           RadiusY="1"
                                           Opacity="0" />
                                <Path HorizontalAlignment="Center"
                                      x:Name="Up_Arrow"
                                      VerticalAlignment="Center"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Data="M 0 0 L 4 4 L 8 0 Z" />
                                <Path Visibility="Collapsed"
                                      HorizontalAlignment="Center"
                                      x:Name="Down_Arrow"
                                      VerticalAlignment="Center"
                                      Fill="{DynamicResource GlyphBrush}"
                                      Data="M 0 4 L 4 0 L 8 4 Z" />
                            </Grid>
                            <ContentPresenter SnapsToDevicePixels="True"
                                              HorizontalAlignment="Center"
                                              Margin="4,4,2,0"
                                              VerticalAlignment="Top"
                                              Grid.Row="1"
                                              RecognizesAccessKey="True">
                                <ContentPresenter.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </ContentPresenter.LayoutTransform>
                            </ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="Up_Arrow"
                                    Value="Collapsed" />
                            <Setter Property="Visibility"
                                    TargetName="Down_Arrow"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Expander}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <Border SnapsToDevicePixels="true"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1,1,1,1"
                            CornerRadius="3">
                        <DockPanel x:Name="dockPanel">
                            <ToggleButton FontFamily="{TemplateBinding FontFamily}"
                                          FontSize="{TemplateBinding FontSize}"
                                          FontStretch="{TemplateBinding FontStretch}"
                                          FontStyle="{TemplateBinding FontStyle}"
                                          FontWeight="{TemplateBinding FontWeight}"
                                          Foreground="{TemplateBinding Foreground}"
                                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Padding="{TemplateBinding Padding}"
                                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                          FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
                                          Margin="1,1,1,0"
                                          MinHeight="0"
                                          MinWidth="0"
                                          x:Name="HeaderSite"
                                          Style="{StaticResource ExpanderDownHeaderStyle}"
                                          Content="{TemplateBinding Header}"
                                          ContentTemplate="{TemplateBinding HeaderTemplate}"
                                          ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                          IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                          DockPanel.Dock="Top" />
                            <Border Visibility="Collapsed"
                                    Background="{DynamicResource ShadeBrush}"
                                    BorderBrush="{DynamicResource NormalBorderBrush}"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="3,3,3,3"
                                    x:Name="border"
                                    Margin="1,1,1,1">
                                <ContentPresenter Focusable="false"
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  Margin="1,1,1,1"
                                                  x:Name="ExpandSite"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                  DockPanel.Dock="Bottom" />
                            </Border>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="border"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Down" />
                        <Trigger Property="ExpandDirection"
                                 Value="Right">
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ExpandSite"
                                    Value="Right" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="HeaderSite"
                                    Value="Left" />
                            <Setter Property="Style"
                                    TargetName="HeaderSite"
                                    Value="{StaticResource ExpanderRightHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Up">
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ExpandSite"
                                    Value="Top" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="HeaderSite"
                                    Value="Bottom" />
                            <Setter Property="Style"
                                    TargetName="HeaderSite"
                                    Value="{StaticResource ExpanderUpHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Left">
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ExpandSite"
                                    Value="Left" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="HeaderSite"
                                    Value="Right" />
                            <Setter Property="Style"
                                    TargetName="HeaderSite"
                                    Value="{StaticResource ExpanderLeftHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ComboBoxToggleButton"
                     TargetType="{x:Type ToggleButton}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverShineBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverShineBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="grid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="20" />
            </Grid.ColumnDefinitions>
            <Rectangle Grid.ColumnSpan="2"
                       HorizontalAlignment="Stretch"
                       x:Name="Rectangle"
                       VerticalAlignment="Stretch"
                       Width="Auto"
                       Height="Auto"
                       RadiusX="3"
                       RadiusY="3"
                       Fill="{DynamicResource LightBrush}"
                       Stroke="{DynamicResource NormalBorderBrush}" />
            <Rectangle Grid.Column="0"
                       HorizontalAlignment="Stretch"
                       VerticalAlignment="Stretch"
                       Width="Auto"
                       Height="Auto"
                       RadiusX="3"
                       RadiusY="3"
                       Fill="{DynamicResource LightBrush}"
                       Stroke="{DynamicResource NormalBorderBrush}" />
            <Border Margin="2,2,2,2"
                    Grid.Column="1"
                    Background="{DynamicResource NormalBrush}"
                    CornerRadius="3,3,3,3"
                    x:Name="border" />
            <Border Margin="2,2,2,2"
                    Background="{DynamicResource HoverBrush}"
                    CornerRadius="3,3,3,3"
                    x:Name="HoverBorder"
                    Grid.Column="1"
                    Opacity="0" />
            <Border Margin="2,2,2,2"
                    Background="{DynamicResource HoverShineBrush}"
                    CornerRadius="3,3,3,3"
                    x:Name="HoverShineBorder"
                    Grid.Column="1"
                    Opacity="0" />
            <Path Grid.Column="1"
                  HorizontalAlignment="Center"
                  x:Name="Arrow"
                  VerticalAlignment="Center"
                  Fill="{x:Null}"
                  Data="M0.5,0.5 L3,6.5 5.5,0.5"
                  Stroke="{DynamicResource GlyphBrush}"
                  Margin="5,0,5,0"
                  Height="7"
                  StrokeThickness="2"
                  Stretch="Fill" />
            <Border Margin="2,2,2,2"
                    Background="{DynamicResource ShineBrush}"
                    CornerRadius="3,3,3,3"
                    x:Name="ShineBorder"
                    Grid.Column="1" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                     x:Name="HoverOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="true" />
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Stroke"
                        TargetName="Arrow"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Background"
                        TargetName="border"
                        Value="{DynamicResource DisabledBorderBrush}" />
                <Setter Property="Opacity"
                        TargetName="grid"
                        Value="0.8" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="ComboBoxTextBox"
                     TargetType="{x:Type TextBox}">
        <Border x:Name="PART_ContentHost"
                Focusable="False"
                Background="{TemplateBinding Background}" />
        <ControlTemplate.Triggers>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="Template"
                Value="{DynamicResource ComboBoxTemplate}" />
    </Style>

    <ControlTemplate x:Key="ComboBoxTemplate"
                     TargetType="{x:Type ComboBox}">
        <Grid x:Name="grid">
            <ToggleButton Grid.Column="2"
                          Template="{DynamicResource ComboBoxToggleButton}"
                          x:Name="ToggleButton"
                          Focusable="false"
                          IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                          ClickMode="Press" />
            <ContentPresenter HorizontalAlignment="Left"
                              Margin="3,3,23,3"
                              x:Name="ContentSite"
                              VerticalAlignment="Center"
                              Content="{TemplateBinding SelectionBoxItem}"
                              ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                              ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                              IsHitTestVisible="False" />
            <TextBox Visibility="Hidden"
                     Template="{DynamicResource ComboBoxTextBox}"
                     HorizontalAlignment="Left"
                     Margin="3,3,23,3"
                     x:Name="PART_EditableTextBox"
                     Style="{x:Null}"
                     VerticalAlignment="Center"
                     Focusable="True"
                     Background="{DynamicResource LightBrush}"
                     IsReadOnly="{TemplateBinding IsReadOnly}"
                     BorderBrush="{DynamicResource NormalBorderBrush}"
                     Foreground="{DynamicResource TextBrush}" />
            <Popup IsOpen="{TemplateBinding IsDropDownOpen}"
                   Placement="Bottom"
                   x:Name="Popup"
                   Focusable="False"
                   AllowsTransparency="True"
                   PopupAnimation="Slide">
                <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}"
                      MinWidth="{TemplateBinding ActualWidth}"
                      x:Name="DropDown"
                      SnapsToDevicePixels="True">
                    <Border x:Name="DropDownBorder"
                            Background="{DynamicResource ControlBackgroundBrush}"
                            CornerRadius="3,3,3,3" />
                    <ScrollViewer Margin="4,6,4,6"
                                  Style="{DynamicResource NuclearScrollViewer}"
                                  SnapsToDevicePixels="True"
                                  HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto"
                                  CanContentScroll="True"
                                  Foreground="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}">
                        <StackPanel IsItemsHost="True"
                                    KeyboardNavigation.DirectionalNavigation="Contained" />
                    </ScrollViewer>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems"
                     Value="false">
                <Setter Property="MinHeight"
                        Value="95"
                        TargetName="DropDownBorder" />
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Opacity"
                        TargetName="grid"
                        Value="0.5" />
            </Trigger>
            <Trigger Property="IsGrouping"
                     Value="true">
                <Setter Property="ScrollViewer.CanContentScroll"
                        Value="false" />
            </Trigger>
            <Trigger Property="AllowsTransparency"
                     SourceName="Popup"
                     Value="true">
                <Setter Property="Margin"
                        Value="0,2,0,0"
                        TargetName="DropDownBorder" />
            </Trigger>
            <Trigger Property="IsEditable"
                     Value="true">
                <Setter Property="IsTabStop"
                        Value="false" />
                <Setter Property="Visibility"
                        Value="Visible"
                        TargetName="PART_EditableTextBox" />
                <Setter Property="Visibility"
                        Value="Hidden"
                        TargetName="ContentSite" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style d:IsControlPart="True"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="HoverOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>

                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="true"
                          Margin="1,1,1,1">
                        <Rectangle x:Name="Background"
                                   IsHitTestVisible="False"
                                   Opacity="0.25"
                                   Fill="{StaticResource NormalBrush}"
                                   RadiusX="1"
                                   RadiusY="1" />
                        <Rectangle x:Name="HoverRectangle"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   Fill="{StaticResource NormalBrush}"
                                   RadiusX="1"
                                   RadiusY="1" />
                        <Rectangle x:Name="SelectedRectangle"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   Fill="{StaticResource SelectedBackgroundBrush}"
                                   RadiusX="1"
                                   RadiusY="1" />
                        <ContentPresenter Margin="5,2,0,2"
                                          x:Name="contentPresenter"
                                          VerticalAlignment="Center" />
                        <Rectangle x:Name="FocusVisualElement"
                                   Visibility="Collapsed"
                                   Stroke="{StaticResource HoverShineBrush}"
                                   StrokeThickness="1"
                                   RadiusX="1"
                                   RadiusY="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsHighlighted"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ProgressBar}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="ValueChangedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PART_Track"
                                                           Storyboard.TargetProperty="(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="0" />
                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000"
                                                      Value="1" />
                                <SplineDoubleKeyFrame KeyTime="00:00:02"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="IndeterminateOn">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill"
                                                           Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X"
                                                           RepeatBehavior="Forever">
                                <SplineDoubleKeyFrame KeyTime="0"
                                                      Value="0" />
                                <SplineDoubleKeyFrame KeyTime="00:00:2.4"
                                                      Value="145" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="PART_Track"
                                BorderBrush="{DynamicResource SolidBorderBrush}"
                                BorderThickness="1"
                                CornerRadius="0,0,0,0"
                                Background="{DynamicResource LightBrush}">
                            <Border.BitmapEffect>
                                <OuterGlowBitmapEffect Opacity="0"
                                                       GlowColor="{DynamicResource WhiteColor}"
                                                       GlowSize="3" />
                            </Border.BitmapEffect>
                        </Border>
                        <Border HorizontalAlignment="Left"
                                x:Name="PART_Indicator"
                                BorderBrush="{DynamicResource NormalBorderBrush}"
                                BorderThickness="1"
                                CornerRadius="0,0,0,0">
                            <Border.Background>
                                <LinearGradientBrush EndPoint=".7,1"
                                                     StartPoint=".7,0">
                                    <GradientStop Color="#B2FFFFFF"
                                                  Offset="0" />
                                    <GradientStop Color="#C6FFFFFF"
                                                  Offset="0.15" />
                                    <GradientStop Color="#D1FFFFFF"
                                                  Offset="0.275" />
                                    <GradientStop Color="#C6FFFFFF"
                                                  Offset="0.4" />
                                    <GradientStop Color="#BFFFFFFF"
                                                  Offset="0.65" />
                                    <GradientStop Color="#A5FFFFFF"
                                                  Offset="0.75" />
                                    <GradientStop Color="#91FFFFFF"
                                                  Offset="0.85" />
                                    <GradientStop Color="#72FFFFFF"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Grid x:Name="IndeterminateRoot"
                              Visibility="Collapsed">
                            <Rectangle Margin="{TemplateBinding BorderThickness}"
                                       x:Name="IndeterminateSolidFill"
                                       Opacity="1"
                                       RenderTransformOrigin="0.5,0.5"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Fill="{DynamicResource ControlBackgroundBrush}"
                                       Stroke="#FF448DCA"
                                       StrokeThickness="0" />
                            <Rectangle Margin="{TemplateBinding BorderThickness}"
                                       x:Name="IndeterminateGradientFill"
                                       RadiusX="2"
                                       RadiusY="2"
                                       StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.508,1.394"
                                                         StartPoint="0.401,-0.394"
                                                         SpreadMethod="Repeat">
                                        <GradientStop Color="#00FFFFFF" />
                                        <GradientStop Color="#FEA1A1A1"
                                                      Offset="1" />
                                        <GradientStop Color="#00FEFEFE"
                                                      Offset="0.517" />
                                        <GradientStop Color="#FEA1A1A1"
                                                      Offset="0.517" />
                                        <LinearGradientBrush.Transform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" />
                                            </TransformGroup>
                                        </LinearGradientBrush.Transform>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                        </Grid>
                        <Border Background="{DynamicResource DisabledBackgroundBrush}"
                                Opacity="0"
                                BorderThickness="1,1,1,1"
                                BorderBrush="{DynamicResource DisabledBorderBrush}"
                                x:Name="border" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Opacity"
                                    TargetName="border"
                                    Value="0.8" />
                        </Trigger>
                        <EventTrigger RoutedEvent="RangeBase.ValueChanged">
                            <BeginStoryboard Storyboard="{StaticResource ValueChangedOn}" />
                        </EventTrigger>
                        <Trigger Property="IsIndeterminate"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource IndeterminateOn}" />
                            </Trigger.EnterActions>
                            <Setter Property="Visibility"
                                    TargetName="IndeterminateRoot"
                                    Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Template"
                Value="{DynamicResource TextBoxTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="BorderBrush"
                Value="#FF000000" />
    </Style>

    <ControlTemplate x:Key="TextBoxTemplate"
                     TargetType="{x:Type TextBox}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="0.5" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="Opacity">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="Opacity">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid>
            <Border x:Name="Border"
                    Opacity="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2"
                    Background="{TemplateBinding Background}">
                <Grid>
                    <Border BorderThickness="1">
                        <ScrollViewer Margin="0"
                                      x:Name="PART_ContentHost"
                                      Style="{DynamicResource NuclearScrollViewer}" />
                    </Border>
                </Grid>
            </Border>
            <Border x:Name="HoverBorder"
                    IsHitTestVisible="False"
                    Opacity="0"
                    BorderBrush="{StaticResource GlyphBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2" />
            <Border x:Name="FocusVisualElement"
                    IsHitTestVisible="False"
                    Opacity="0"
                    BorderBrush="{StaticResource HoverShineBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2" />

        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                     x:Name="FocusedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                     x:Name="FocusedOn_BeginStoryboard" />
                </Trigger.EnterActions>

            </Trigger>
            <MultiTrigger>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                     x:Name="HoverOff_BeginStoryboard" />
                </MultiTrigger.ExitActions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </MultiTrigger.EnterActions>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver"
                               Value="True" />
                    <Condition Property="IsFocused"
                               Value="False" />
                </MultiTrigger.Conditions>

            </MultiTrigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Background"
                        TargetName="Border"
                        Value="{DynamicResource DisabledBackgroundBrush}" />
                <Setter Property="BorderBrush"
                        TargetName="Border"
                        Value="{DynamicResource DisabledBorderBrush}" />
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="Border"
                                Opacity="1"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2"
                                Background="{TemplateBinding Background}">
                            <Grid>
                                <Border BorderThickness="1">
                                    <ScrollViewer Margin="0"
                                                  x:Name="PART_ContentHost"
                                                  Style="{DynamicResource NuclearScrollViewer}" />
                                </Border>
                            </Grid>
                        </Border>
                        <Border x:Name="HoverBorder"
                                IsHitTestVisible="False"
                                Opacity="0"
                                BorderBrush="{StaticResource GlyphBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2" />
                        <Border x:Name="FocusVisualElement"
                                IsHitTestVisible="False"
                                Opacity="0"
                                BorderBrush="{StaticResource HoverShineBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2" />

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Background"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBorderBrush}" />
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="BorderBrush"
                Value="#FF000000" />
    </Style>

    <Style TargetType="{x:Type RichTextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RichTextBox}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="Border"
                                Opacity="1"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2"
                                Background="{TemplateBinding Background}">
                            <Grid>
                                <Border BorderThickness="1">
                                    <ScrollViewer Margin="0"
                                                  x:Name="PART_ContentHost"
                                                  Style="{DynamicResource NuclearScrollViewer}" />
                                </Border>
                            </Grid>
                        </Border>
                        <Border x:Name="HoverBorder"
                                IsHitTestVisible="False"
                                Opacity="0"
                                BorderBrush="{StaticResource GlyphBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2" />
                        <Border x:Name="FocusVisualElement"
                                IsHitTestVisible="False"
                                Opacity="0"
                                BorderBrush="{StaticResource HoverShineBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2,2,2,2" />

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Background"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBorderBrush}" />
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="BorderBrush"
                Value="#FF000000" />
    </Style>
    <Style TargetType="{x:Type Label}">
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Label}">
                    <Grid>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          RecognizesAccessKey="True" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
    </Style>

    <Style TargetType="{x:Type Menu}">
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="SnapsToDevicePixels"
                Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Grid>
                        <Border Margin="1"
                                x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" />
                        <StackPanel Background="{TemplateBinding Background}"
                                    IsItemsHost="True"
                                    ClipToBounds="True"
                                    Orientation="Horizontal" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Background"
                                    Value="{DynamicResource DisabledBackgroundBrush}"
                                    TargetName="Border" />
                            <Setter Property="BorderBrush"
                                    Value="{DynamicResource DisabledBorderBrush}"
                                    TargetName="Border" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DropShadowBitmapEffect x:Key="PopupDropShadow"
                            ShadowDepth="1.5"
                            Softness="0.15" />
    <Style TargetType="{x:Type MenuItem}">
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HighlightedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HightlightedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border x:Name="Border"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0,0,0,0"
                            Margin="3,2,3,2">
                        <Grid Margin="0,0,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition MinWidth="17"
                                                  Width="Auto"
                                                  SharedSizeGroup="MenuItemIconColumnGroup" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto"
                                                  SharedSizeGroup="MenuItemIGTColumnGroup" />
                                <ColumnDefinition Width="14" />
                            </Grid.ColumnDefinitions>
                            <Border Grid.Column="0"
                                    Grid.ColumnSpan="4"
                                    Background="{DynamicResource HoverBrush}"
                                    Opacity="0"
                                    x:Name="HoverBorder"
                                    CornerRadius="1,1,1,1" />
                            <Border Grid.ColumnSpan="4"
                                    Background="{DynamicResource HoverShineBrush}"
                                    Opacity="0"
                                    x:Name="HoverShineBorder"
                                    CornerRadius="1,1,1,1" />
                            <ContentPresenter Margin="4,0,6,0"
                                              x:Name="Icon"
                                              VerticalAlignment="Center"
                                              ContentSource="Icon" />
                            <Grid Visibility="Hidden"
                                  Margin="4,0,6,0"
                                  x:Name="GlyphPanel"
                                  VerticalAlignment="Center">
                                <Path x:Name="GlyphPanelpath"
                                      VerticalAlignment="Center"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z"
                                      FlowDirection="LeftToRight" />
                            </Grid>
                            <ContentPresenter Grid.Column="1"
                                              x:Name="HeaderHost"
                                              RecognizesAccessKey="True"
                                              ContentSource="Header"
                                              Margin="2,1,2,1" />
                            <Grid Grid.Column="3"
                                  Margin="4,0,6,0"
                                  x:Name="ArrowPanel"
                                  VerticalAlignment="Center">
                                <Path x:Name="ArrowPanelPath"
                                      VerticalAlignment="Center"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M0,0 L0,8 L4,4 z" />
                            </Grid>
                            <Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                   Placement="Right"
                                   x:Name="SubMenuPopup"
                                   Focusable="false"
                                   AllowsTransparency="true"
                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
                                <Grid x:Name="SubMenu">
                                    <Border x:Name="SubMenuBorder"
                                            Background="{DynamicResource LightBrush}"
                                            BorderThickness="1"
                                            Opacity="0.8">
                                        <Border.BorderBrush>
                                            <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                                        </Border.BorderBrush>
                                    </Border>
                                    <StackPanel IsItemsHost="True"
                                                KeyboardNavigation.DirectionalNavigation="Cycle" />
                                </Grid>
                            </Popup>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Role"
                                 Value="TopLevelHeader">
                            <Setter Property="Margin"
                                    Value="0,1,0,1" />
                            <Setter Property="Padding"
                                    Value="6,3,6,3" />
                            <Setter Property="Grid.IsSharedSizeScope"
                                    Value="true" />
                            <Setter Property="Placement"
                                    Value="Bottom"
                                    TargetName="SubMenuPopup" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ArrowPanel" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="TopLevelItem">
                            <Setter Property="Margin"
                                    Value="0,1,0,1" />
                            <Setter Property="Padding"
                                    Value="6,3,6,3" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ArrowPanel" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="SubmenuHeader">
                            <Setter Property="DockPanel.Dock"
                                    Value="Top" />
                            <Setter Property="Padding"
                                    Value="0,2,0,2" />
                            <Setter Property="Grid.IsSharedSizeScope"
                                    Value="true" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="SubmenuItem">
                            <Setter Property="DockPanel.Dock"
                                    Value="Top" />
                            <Setter Property="Padding"
                                    Value="0,2,0,2" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ArrowPanel" />
                        </Trigger>
                        <Trigger Property="IsSuspendingPopupAnimation"
                                 Value="true">
                            <Setter Property="PopupAnimation"
                                    Value="None"
                                    TargetName="SubMenuPopup" />
                        </Trigger>
                        <Trigger Property="Icon"
                                 Value="{x:Null}">
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="Icon" />
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="GlyphPanel" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="Icon" />
                        </Trigger>
                        <Trigger Property="AllowsTransparency"
                                 SourceName="SubMenuPopup"
                                 Value="true">
                            <Setter Property="Margin"
                                    Value="0,0,3,3"
                                    TargetName="SubMenu" />
                            <Setter Property="SnapsToDevicePixels"
                                    Value="true"
                                    TargetName="SubMenu" />
                            <Setter Property="BitmapEffect"
                                    Value="{DynamicResource PopupDropShadow}"
                                    TargetName="SubMenuBorder" />
                        </Trigger>
                        <Trigger Property="IsHighlighted"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HightlightedOff}"
                                                 x:Name="HightlightedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HighlightedOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Separator}">
        <Setter Property="Height"
                Value="1" />
        <Setter Property="Margin"
                Value="0,2,0,2" />
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border BorderBrush="{DynamicResource SolidBorderBrush}"
                            BorderThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true"
                          SnapsToDevicePixels="true"
                          KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1"
                                              Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"
                                           x:Name="RowDefinition0" />
                            <RowDefinition Height="*"
                                           x:Name="RowDefinition1" />
                        </Grid.RowDefinitions>
                        <Border CornerRadius="2,2,0,0"
                                Background="{DynamicResource LightBrush}"
                                x:Name="border">
                            <TabPanel x:Name="HeaderPanel"
                                      IsItemsHost="true"
                                      Panel.ZIndex="1"
                                      KeyboardNavigation.TabIndex="1"
                                      RenderTransformOrigin="0.5,0.5"
                                      Width="Auto"
                                      Height="Auto">
                                <TabPanel.LayoutTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </TabPanel.LayoutTransform>
                                <TabPanel.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </TabPanel.RenderTransform>

                            </TabPanel>
                        </Border>
                        <Border x:Name="ContentPanel"
                                Grid.Column="0"
                                Grid.Row="1"
                                KeyboardNavigation.DirectionalNavigation="Contained"
                                KeyboardNavigation.TabIndex="2"
                                KeyboardNavigation.TabNavigation="Local"
                                Background="{DynamicResource ShadeBrush}"
                                CornerRadius="0,0,2,2">
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                              x:Name="PART_SelectedContentHost"
                                              ContentSource="SelectedContent" />
                        </Border>
                        <Border HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                Width="Auto"
                                Height="Auto"
                                BorderThickness="0,0,0,1"
                                CornerRadius="10,0,0,0"
                                Opacity="0.5"
                                Margin="2,0,2,0"
                                x:Name="border1">
                            <Border.LayoutTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"
                                                    ScaleY="1" />
                                    <SkewTransform AngleX="0"
                                                   AngleY="0" />
                                    <RotateTransform Angle="0" />
                                    <TranslateTransform X="0"
                                                        Y="0" />
                                </TransformGroup>
                            </Border.LayoutTransform>
                            <Border.BorderBrush>
                                <SolidColorBrush Color="{DynamicResource BlackColor}" />
                            </Border.BorderBrush>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement"
                                 Value="Bottom">
                            <Setter Property="Grid.Row"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition0"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition1"
                                    Value="Auto" />
                            <Setter Property="Grid.Row"
                                    TargetName="border"
                                    Value="1" />
                            <Setter Property="CornerRadius"
                                    TargetName="ContentPanel"
                                    Value="2,2,0,0" />
                            <Setter Property="CornerRadius"
                                    TargetName="border"
                                    Value="0,0,2,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Left">

                            <Setter Property="Grid.Row"
                                    TargetName="HeaderPanel"
                                    Value="0" />
                            <Setter Property="Grid.Row"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="ContentPanel"
                                    Value="1" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition0"
                                    Value="Auto" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition1"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition0"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition1"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="border"
                                    Value="0" />
                            <Setter Property="Margin"
                                    TargetName="border"
                                    Value="0,0,0,0" />
                            <Setter Property="Margin"
                                    TargetName="ContentPanel"
                                    Value="0,0,0,0" />
                            <Setter Property="LayoutTransform"
                                    TargetName="border1">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Margin"
                                    TargetName="border1"
                                    Value="0,0,0,0" />
                            <Setter Property="CornerRadius"
                                    TargetName="border"
                                    Value="0,2,2,0" />
                            <Setter Property="CornerRadius"
                                    TargetName="ContentPanel"
                                    Value="0,2,2,0" />

                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Right">
                            <Setter Property="Grid.Row"
                                    TargetName="HeaderPanel"
                                    Value="0" />
                            <Setter Property="Grid.Row"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition0"
                                    Value="*" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition1"
                                    Value="Auto" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition0"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition1"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="border"
                                    Value="1" />
                            <Setter Property="LayoutTransform"
                                    TargetName="border1">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Grid.Column"
                                    TargetName="border1"
                                    Value="1" />
                            <Setter Property="CornerRadius"
                                    TargetName="ContentPanel"
                                    Value="2,0,0,2" />
                            <Setter Property="CornerRadius"
                                    TargetName="border"
                                    Value="0,2,2,0" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style d:IsControlPart="True"
           TargetType="{x:Type TabItem}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid x:Name="grid"
                          Margin="2,1,2,3">
                        <Grid.LayoutTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                                ScaleY="1" />
                                <SkewTransform AngleX="0"
                                               AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                                    Y="0" />
                            </TransformGroup>
                        </Grid.LayoutTransform>
                        <Border x:Name="border"
                                BorderBrush="{x:Null}"
                                CornerRadius="2,2,2,2"
                                Opacity="0.5">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,0.976"
                                                     StartPoint="0.5,0.039">
                                    <GradientStop Color="#7F595959"
                                                  Offset="0" />
                                    <GradientStop Color="#19FFFFFF"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border x:Name="SelectedBorder"
                                BorderBrush="{x:Null}"
                                CornerRadius="2,2,2,2"
                                Opacity="0"
                                Background="{DynamicResource SelectedBackgroundBrush}" />
                        <Border x:Name="HoverBorder"
                                BorderBrush="{x:Null}"
                                CornerRadius="2,2,2,2"
                                Opacity="0">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,0.976"
                                                     StartPoint="0.5,0.039">
                                    <GradientStop Color="#7F595959"
                                                  Offset="0" />
                                    <GradientStop Color="#19FFFFFF"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Grid>
                            <ContentPresenter x:Name="ContentSite"
                                              RecognizesAccessKey="True"
                                              ContentSource="Header"
                                              d:LayoutOverrides="Width, Height"
                                              HorizontalAlignment="Center"
                                              Margin="6,1,6,1"
                                              VerticalAlignment="Center" />
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement"
                                 Value="Left">
                            <Setter Property="LayoutTransform"
                                    TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Right">
                            <Setter Property="LayoutTransform"
                                    TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Bottom">
                            <Setter Property="LayoutTransform"
                                    TargetName="ContentSite">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="LayoutTransform"
                                    TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="Selector.IsSelected"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsSelected"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                            <Setter Property="Panel.ZIndex"
                                    Value="100" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True"
                                           SourceName="grid" />
                                <Condition Property="Selector.IsSelected"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="border"
                                    Value="{DynamicResource SelectedBackgroundBrush}" />
                            <Setter Property="Opacity"
                                    TargetName="border"
                                    Value="0.9" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                            <Setter Property="Background"
                                    TargetName="border"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="Opacity"
                                    TargetName="grid"
                                    Value="0.3" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected"
                     Value="True">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource BlackColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="NuclearSliderThumb"
           d:IsControlPart="True"
           TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="Height"
                Value="14" />
        <Setter Property="Width"
                Value="14" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="HoverOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="PressedOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="PressedOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="Background"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3" />
                        <Border x:Name="HoverBorder"
                                Opacity="0"
                                Background="{StaticResource HoverBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3" />
                        <Border x:Name="HoverShineBorder"
                                Opacity="0"
                                Background="{StaticResource HoverShineBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3" />
                        <Border x:Name="PressedBorder"
                                Opacity="0"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3"
                                Background="{StaticResource PressedBrush}" />
                        <Border x:Name="ShineBorder"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3"
                                Background="{StaticResource ShineBrush}"
                                Opacity="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsDragging"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Background"
                                    TargetName="Background"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="BorderThickness"
                Value="1,1,1,1" />
    </Style>
    <Style TargetType="{x:Type Slider}">
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Grid x:Name="GridRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto"
                                           MinHeight="{TemplateBinding MinHeight}" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <TickBar Visibility="Collapsed"
                                 x:Name="TopTick"
                                 Height="4"
                                 SnapsToDevicePixels="True"
                                 Placement="Top"
                                 Fill="{DynamicResource GlyphBrush}" />
                        <Border Grid.Row="1"
                                Margin="0"
                                x:Name="Border"
                                Height="4"
                                CornerRadius="2"
                                Background="{DynamicResource LightBrush}"
                                BorderBrush="{DynamicResource NormalBorderBrush}"
                                BorderThickness="1,1,1,1" />
                        <Track Grid.Row="1"
                               x:Name="PART_Track">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource NuclearSliderThumb}"
                                       Background="{DynamicResource NormalBrush}"
                                       Foreground="{x:Null}"
                                       Width="20" />
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="Slider.IncreaseLarge" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="Slider.DecreaseLarge" />
                            </Track.DecreaseRepeatButton>
                        </Track>
                        <TickBar Visibility="Collapsed"
                                 Grid.Row="2"
                                 x:Name="BottomTick"
                                 Height="4"
                                 SnapsToDevicePixels="True"
                                 Placement="Bottom"
                                 Fill="{TemplateBinding Foreground}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TickPlacement"
                                 Value="TopLeft">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="TopTick" />
                        </Trigger>
                        <Trigger Property="TickPlacement"
                                 Value="BottomRight">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="BottomTick" />
                        </Trigger>
                        <Trigger Property="TickPlacement"
                                 Value="Both">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="TopTick" />
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="BottomTick" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Background"
                                    Value="{DynamicResource DisabledBackgroundBrush}"
                                    TargetName="Border" />
                            <Setter Property="BorderBrush"
                                    Value="{DynamicResource DisabledBorderBrush}"
                                    TargetName="Border" />
                        </Trigger>
                        <Trigger Property="Orientation"
                                 Value="Vertical">
                            <Setter Property="LayoutTransform"
                                    TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="PART_Track"
                                    Property="Orientation"
                                    Value="Horizontal" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type TreeView}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeView}">
                    <Grid>
                        <Border x:Name="Border"
                                Background="{DynamicResource ControlBackgroundBrush}"
                                BorderBrush="{x:Null}"
                                BorderThickness="1"
                                CornerRadius="3,3,3,3">
                            <ScrollViewer Style="{DynamicResource NuclearScrollViewer}"
                                          Focusable="False"
                                          Padding="4"
                                          HorizontalScrollBarVisibility="Auto"
                                          VerticalScrollBarVisibility="Auto"
                                          CanContentScroll="False"
                                          Foreground="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}">
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearTreeViewItemToggleButton"
           d:IsControlPart="True"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Width="15"
                          Height="13">
                        <Path Visibility="Collapsed"
                              HorizontalAlignment="Left"
                              Margin="1,1,1,1"
                              x:Name="IsExpandedPath"
                              VerticalAlignment="Center"
                              Fill="{DynamicResource GlyphBrush}"
                              Data="M 0 4 L 8 4 L 4 8 Z" />
                        <Path HorizontalAlignment="Left"
                              Margin="1,1,1,1"
                              x:Name="ExpandPath"
                              VerticalAlignment="Center"
                              Fill="{DynamicResource GlyphBrush}"
                              Data="M 4 0 L 8 4 L 4 8 Z" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="True">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="IsExpandedPath" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ExpandPath" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style d:IsControlPart="True"
           TargetType="{x:Type TreeViewItem}">
        <Style.Triggers>
            <Trigger Property="IsSelected"
                     Value="True">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource BlackColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Padding"
                Value="1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectionBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectionBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="19"
                                              Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="Expander"
                                      Style="{DynamicResource NuclearTreeViewItemToggleButton}"
                                      IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
                                      ClickMode="Press"
                                      Background="{x:Null}"
                                      BorderBrush="{x:Null}"
                                      Foreground="{x:Null}" />
                        <Border Grid.Column="1"
                                x:Name="Selection_Border"
                                BorderThickness="1,1,1,1"
                                CornerRadius="3,3,3,3">
                            <Grid Width="Auto"
                                  Height="Auto">
                                <Border x:Name="MainBorder"
                                        Opacity="0.25"
                                        Background="{DynamicResource NormalBrush}"
                                        CornerRadius="2,2,2,2" />
                                <Border x:Name="SelectionBorder"
                                        Opacity="0"
                                        Background="{DynamicResource SelectedBackgroundBrush}"
                                        CornerRadius="2,2,2,2" />
                                <Border x:Name="HoverBorder"
                                        Opacity="0"
                                        Background="{DynamicResource NormalBrush}"
                                        CornerRadius="2,2,2,2" />
                                <ContentPresenter x:Name="PART_Header"
                                                  ContentSource="Header"
                                                  d:LayoutOverrides="Width"
                                                  Height="Auto"
                                                  Margin="2,0,2,0" />
                            </Grid>
                        </Border>
                        <ItemsPresenter Grid.Column="1"
                                        Grid.ColumnSpan="2"
                                        Grid.Row="1"
                                        x:Name="ItemsHost" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded"
                                 Value="false">
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ItemsHost" />
                        </Trigger>
                        <Trigger Property="HasItems"
                                 Value="false">
                            <Setter Property="Visibility"
                                    Value="Hidden"
                                    TargetName="Expander" />
                        </Trigger>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOn_BeginStoryboard1" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true" />
                                <Condition Property="IsSelectionActive"
                                           Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
                            <Setter Property="Background"
                                    TargetName="Selection_Border"
                                    Value="{DynamicResource SelectedBackgroundBrush}" />
                            <Setter Property="Opacity"
                                    TargetName="Selection_Border"
                                    Value="0.5" />
                            <Setter Property="BorderBrush"
                                    TargetName="Selection_Border"
                                    Value="{DynamicResource NormalBorderBrush}" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           SourceName="Selection_Border"
                                           Value="True" />
                                <Condition Property="IsSelected"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true" />
                                <Condition Property="IsMouseOver"
                                           Value="true"
                                           SourceName="Selection_Border" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Selection_Border"
                                    Value="{DynamicResource SelectedBackgroundBrush}" />
                            <Setter Property="Opacity"
                                    TargetName="Selection_Border"
                                    Value="0.8" />
                            <Setter Property="BorderBrush"
                                    TargetName="Selection_Border"
                                    Value="{DynamicResource NormalBorderBrush}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle SnapsToDevicePixels="true"
                               Margin="2"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ButtonNormalBackground"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#F3F3F3"
                      Offset="0" />
        <GradientStop Color="#EBEBEB"
                      Offset="0.5" />
        <GradientStop Color="#DDDDDD"
                      Offset="0.5" />
        <GradientStop Color="#CDCDCD"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonNormalBorder"
                     Color="#FF707070" />

    <Style TargetType="{x:Type ToggleButton}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background"
                Value="{StaticResource ButtonNormalBackground}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource ButtonNormalBorder}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="CheckedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="CheckedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Pressed"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Pressed"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid x:Name="grid">

                        <Border x:Name="Border"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                Background="{DynamicResource NormalBrush}"
                                BorderBrush="{DynamicResource NormalBorderBrush}"
                                CornerRadius="3,3,3,3" />
                        <Border x:Name="CheckedBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                Background="{DynamicResource SelectedBackgroundBrush}"
                                BorderBrush="{DynamicResource NormalBorderBrush}"
                                CornerRadius="3,3,3,3"
                                Opacity="0" />
                        <Border x:Name="HoverBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                BorderBrush="{DynamicResource NormalBorderBrush}"
                                CornerRadius="3,3,3,3"
                                Opacity="0"
                                Background="{DynamicResource HoverBrush}" />
                        <Border x:Name="HoverShineBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                BorderBrush="{DynamicResource NormalBorderBrush}"
                                CornerRadius="3,3,3,3"
                                Opacity="0"
                                Background="{DynamicResource HoverShineBrush}" />
                        <Border x:Name="Pressed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                BorderBrush="{DynamicResource PressedBorderBrush}"
                                CornerRadius="3,3,3,3"
                                Opacity="0"
                                Background="{DynamicResource PressedBrush}" />
                        <Rectangle Opacity="1"
                                   Stroke="{x:Null}"
                                   RadiusX="3"
                                   RadiusY="3"
                                   Margin="2,2,2,2"
                                   VerticalAlignment="Stretch"
                                   Height="Auto"
                                   x:Name="Shine">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,0.971"
                                                     StartPoint="0.5,0.042">
                                    <GradientStop Color="#26FFFFFF"
                                                  Offset="0" />
                                    <GradientStop Color="#00FFFFFF"
                                                  Offset="1" />
                                    <GradientStop Color="#26FFFFFF"
                                                  Offset="0.467" />
                                    <GradientStop Color="#00FFFFFF"
                                                  Offset="0.475" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          RecognizesAccessKey="True"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          Margin="4,4,4,4" />
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true" />
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="#ADADAD" />
                            <Setter Property="Background"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Border"
                                    Value="{DynamicResource DisabledBorderBrush}" />
                            <Setter Property="Opacity"
                                    TargetName="grid"
                                    Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked"
                     Value="True">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource BlackColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
    <Style TargetType="{x:Type GroupBox}">
        <Setter Property="BorderBrush"
                Value="#D5DFE5" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupBox}">
                    <Grid SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="6" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="6" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="6" />
                        </Grid.RowDefinitions>
                        <Border Grid.ColumnSpan="4"
                                Grid.RowSpan="4"
                                Background="{DynamicResource LightBrush}"
                                CornerRadius="4,4,4,4"
                                BorderThickness="1,1,1,1" />
                        <Border Grid.ColumnSpan="4"
                                Grid.Row="1"
                                Grid.RowSpan="3"
                                BorderThickness="1,1,1,1"
                                CornerRadius="4"
                                BorderBrush="{DynamicResource NormalBorderBrush}">
                            <Border.OpacityMask>
                                <MultiBinding Converter="{StaticResource BorderGapMaskConverter}"
                                              ConverterParameter="7">
                                    <Binding Path="ActualWidth"
                                             ElementName="Header" />
                                    <Binding Path="ActualWidth"
                                             RelativeSource="{RelativeSource Self}" />
                                    <Binding Path="ActualHeight"
                                             RelativeSource="{RelativeSource Self}" />
                                </MultiBinding>
                            </Border.OpacityMask>
                            <Border BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="3">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{DynamicResource MainColor}" />
                                </Border.BorderBrush>
                                <Border BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="2">
                                    <Border.BorderBrush>
                                        <SolidColorBrush Color="{DynamicResource MainColor}" />
                                    </Border.BorderBrush>
                                </Border>
                            </Border>
                        </Border>
                        <Border Grid.Column="0"
                                Grid.ColumnSpan="4"
                                Grid.Row="1"
                                Grid.RowSpan="3"
                                Background="{TemplateBinding Background}"
                                BorderBrush="Transparent"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="4" />
                        <Border Grid.ColumnSpan="4"
                                Grid.RowSpan="2"
                                Background="{DynamicResource NormalBrush}"
                                BorderThickness="1,1,1,0"
                                CornerRadius="2,2,0,0"
                                x:Name="Main"
                                BorderBrush="{DynamicResource NormalBorderBrush}" />
                        <Rectangle Opacity="1"
                                   Stroke="{x:Null}"
                                   RadiusX="3"
                                   RadiusY="3"
                                   VerticalAlignment="Stretch"
                                   Height="Auto"
                                   x:Name="Shine"
                                   Grid.ColumnSpan="4"
                                   Grid.RowSpan="2"
                                   Margin="1,1,1,1">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,0.971"
                                                     StartPoint="0.5,0.042">
                                    <GradientStop Color="#26FFFFFF"
                                                  Offset="0" />
                                    <GradientStop Color="#00FFFFFF"
                                                  Offset="1" />
                                    <GradientStop Color="#26FFFFFF"
                                                  Offset="0.467" />
                                    <GradientStop Color="#00FFFFFF"
                                                  Offset="0.475" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <Border x:Name="Header"
                                Grid.Column="1"
                                Grid.Row="0"
                                Grid.RowSpan="2"
                                Padding="3,1,3,0">
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                              ContentSource="Header"
                                              RecognizesAccessKey="True"
                                              Margin="0,4,0,4" />
                        </Border>

                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          Margin="{TemplateBinding Padding}"
                                          Grid.Column="1"
                                          Grid.ColumnSpan="2"
                                          Grid.Row="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
    </Style>

    <SolidColorBrush x:Key="ListBorder"
                     Color="#828790" />
    <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}"
           TargetType="{x:Type ScrollViewer}">
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid SnapsToDevicePixels="true"
                          Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <DockPanel Margin="{TemplateBinding Padding}">
                            <ScrollViewer Focusable="false"
                                          DockPanel.Dock="Top"
                                          HorizontalScrollBarVisibility="Hidden"
                                          VerticalScrollBarVisibility="Hidden">
                                <GridViewHeaderRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                            Margin="2,0,2,0"
                                                            AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}"
                                                            Columns="{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" />

                            </ScrollViewer>
                            <ScrollContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                    x:Name="PART_ScrollContentPresenter"
                                                    Content="{TemplateBinding Content}"
                                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                                    CanContentScroll="{TemplateBinding CanContentScroll}"
                                                    KeyboardNavigation.DirectionalNavigation="Local" />
                        </DockPanel>
                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                   Cursor="Arrow"
                                   x:Name="PART_HorizontalScrollBar"
                                   Grid.Row="1"
                                   Orientation="Horizontal"
                                   ViewportSize="{TemplateBinding ViewportWidth}"
                                   Maximum="{TemplateBinding ScrollableWidth}"
                                   Minimum="0.0"
                                   Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Cursor="Arrow"
                                   x:Name="PART_VerticalScrollBar"
                                   Grid.Column="1"
                                   Orientation="Vertical"
                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   Minimum="0.0"
                                   Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <DockPanel Grid.Column="1"
                                   Grid.Row="1"
                                   Background="{Binding Path=Background, ElementName=PART_VerticalScrollBar}"
                                   LastChildFill="false">
                            <Rectangle Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                       Width="1"
                                       Fill="White"
                                       DockPanel.Dock="Left" />
                            <Rectangle Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                       Height="1"
                                       Fill="White"
                                       DockPanel.Dock="Top" />
                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ListView}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource ListBorder}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Foreground"
                Value="#FF042271" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="true" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListView}">
                    <Border x:Name="Bd"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0,0,0,0"
                            BorderBrush="{DynamicResource DefaultedBorderBrush}"
                            Background="{DynamicResource ControlBackgroundBrush}">

                        <ScrollViewer Padding="{TemplateBinding Padding}"
                                      Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ListViewItemFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Stroke="#8E6EA6F5"
                               StrokeThickness="1"
                               RadiusX="2"
                               RadiusY="2" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ListViewItem}">
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource ListViewItemFocusVisual}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Margin"
                Value="0,0,0,1" />
        <Setter Property="Padding"
                Value="5,2,5,2" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="HoverOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">

                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedRectangle"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="FocussedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocussedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border SnapsToDevicePixels="true"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2"
                            x:Name="border">

                        <Grid Margin="2,0,2,0">
                            <Rectangle x:Name="Background"
                                       IsHitTestVisible="False"
                                       Opacity="0.25"
                                       Fill="{StaticResource NormalBrush}"
                                       RadiusX="1"
                                       RadiusY="1" />
                            <Rectangle x:Name="HoverRectangle"
                                       IsHitTestVisible="False"
                                       Opacity="0"
                                       Fill="{StaticResource NormalBrush}"
                                       RadiusX="1"
                                       RadiusY="1" />
                            <Rectangle x:Name="SelectedRectangle"
                                       IsHitTestVisible="False"
                                       Opacity="0"
                                       Fill="{StaticResource SelectedBackgroundBrush}"
                                       RadiusX="1"
                                       RadiusY="1" />
                            <GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                  Margin="0,2,0,2"
                                                  VerticalAlignment="Stretch" />
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="Selector.IsSelected"
                                           Value="False" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                            <Setter Property="Fill"
                                    TargetName="Background"
                                    Value="{DynamicResource DisabledBackgroundBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true" />
                                <Condition Property="Selector.IsSelectionActive"
                                           Value="false" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected"
                     Value="True">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource BlackColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="GridViewColumnHeaderGripper"
           TargetType="{x:Type Thumb}">
        <Setter Property="Canvas.Right"
                Value="-8.5" />
        <Setter Property="Width"
                Value="18" />
        <Setter Property="Height"
                Value="{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Padding"
                Value="0,3,0,4" />
        <Setter Property="Background"
                Value="{DynamicResource LightBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Rectangle HorizontalAlignment="Center"
                                   Width="0.5">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type GridViewColumnHeader}"
           TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Background"
                Value="{DynamicResource LightBrush}" />
        <Setter Property="Padding"
                Value="2,0,2,0" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="HoverShineBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="PressedBorder"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Margin="0,1,0,1">
                        <Grid>

                            <Border x:Name="Main"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Padding="{TemplateBinding Padding}"
                                    Background="{DynamicResource NormalBrush}"
                                    BorderBrush="{DynamicResource NormalBorderBrush}"
                                    CornerRadius="0,0,0,0" />
                            <Rectangle Opacity="1"
                                       Stroke="{x:Null}"
                                       RadiusX="0"
                                       RadiusY="0"
                                       VerticalAlignment="Stretch"
                                       Height="Auto"
                                       x:Name="Shine"
                                       Fill="{DynamicResource ShineBrush}" />
                            <Border x:Name="HoverBorder"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Padding="{TemplateBinding Padding}"
                                    Background="{DynamicResource HoverBrush}"
                                    BorderBrush="{DynamicResource NormalBorderBrush}"
                                    CornerRadius="0,0,0,0"
                                    Opacity="0" />
                            <Border x:Name="HoverShineBorder"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Padding="{TemplateBinding Padding}"
                                    Background="{DynamicResource HoverShineBrush}"
                                    BorderBrush="{DynamicResource NormalBorderBrush}"
                                    CornerRadius="0,0,0,0"
                                    Opacity="0" />
                            <Border x:Name="PressedBorder"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Padding="{TemplateBinding Padding}"
                                    Background="{DynamicResource PressedBrush}"
                                    BorderBrush="{DynamicResource PressedBorderBrush}"
                                    CornerRadius="0,0,0,0"
                                    Opacity="0" />

                            <Border BorderThickness="{TemplateBinding BorderThickness}"
                                    Padding="{TemplateBinding Padding}">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                                </Border.BorderBrush>
                                <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  RecognizesAccessKey="True"
                                                  Margin="2,2,2,2" />
                            </Border>
                        </Grid>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper"
                                   Style="{StaticResource GridViewColumnHeaderGripper}"
                                   Margin="0,0,7,0"
                                   Width="Auto"
                                   HorizontalAlignment="Stretch" />
                        </Canvas>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="Height"
                                 Value="Auto">
                            <Setter Property="MinHeight"
                                    Value="20" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="Padding">
                            <Setter TargetName="PART_HeaderGripper"
                                    Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="Floating">
                            <Setter TargetName="PART_HeaderGripper"
                                    Property="Visibility"
                                    Value="Collapsed" />
                            <Setter Property="Background"
                                    Value="Yellow" />
                            <Setter Property="Foreground"
                                    Value="{DynamicResource MouseOverBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Static ToolBar.ButtonStyleKey}"
           TargetType="{x:Type Button}"
           BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource ButtonTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="MinHeight"
                Value="18" />
        <Setter Property="MinWidth"
                Value="50" />
    </Style>

    <Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}"
           TargetType="{x:Type CheckBox}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource CheckBoxTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
    </Style>

    <Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}"
           TargetType="{x:Type RadioButton}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource RadioButtonFocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource RadioButtonTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Style.Triggers>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource TopGradientSelectColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}"
           TargetType="{x:Type ComboBox}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="Template"
                Value="{DynamicResource ComboBoxTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
    </Style>

    <Style x:Key="{x:Static ToolBar.TextBoxStyleKey}"
           TargetType="{x:Type TextBox}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Template"
                Value="{DynamicResource TextBoxTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="BorderBrush"
                Value="#FF000000" />
    </Style>

    <LinearGradientBrush x:Key="ToolBarHorizontalBackground"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#FFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFFBFF"
                      Offset="0.5" />
        <GradientStop Color="#F7F7F7"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ToolBarToggleButtonHorizontalBackground"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#ECECEC"
                      Offset="0" />
        <GradientStop Color="#DDDDDD"
                      Offset="0.5" />
        <GradientStop Color="#A0A0A0"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ToolBarButtonHover"
                     Color="{StaticResource MainColor}" />
    <SolidColorBrush x:Key="ToolBarGripper"
                     Color="#C6C3C6" />
    <Style x:Key="ToolBarHorizontalOverflowButtonStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Background"
                Value="{StaticResource ToolBarToggleButtonHorizontalBackground}" />
        <Setter Property="MinHeight"
                Value="0" />
        <Setter Property="MinWidth"
                Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border SnapsToDevicePixels="true"
                            x:Name="Bd"
                            CornerRadius="0,0,0,0"
                            Background="{DynamicResource LightBrush}">
                        <Canvas SnapsToDevicePixels="true"
                                HorizontalAlignment="Right"
                                Margin="7,2,2,2"
                                VerticalAlignment="Bottom"
                                Width="6"
                                Height="7">
                            <Path Stroke="White"
                                  Data="M 1 1.5 L 6 1.5" />
                            <Path Stroke="{TemplateBinding Foreground}"
                                  Data="M 0 0.5 L 5 0.5" />
                            <Path Fill="White"
                                  Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" />
                            <Path Fill="{TemplateBinding Foreground}"
                                  Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" />
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource MouseOverBrush}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource ToolBarGripper}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="ToolBarSubMenuBackground"
                     Color="#FFFDFDFD" />
    <SolidColorBrush x:Key="ToolBarMenuBorder"
                     Color="#FFFFFFFF" />
    <Style x:Key="ToolBarThumbStyle"
           TargetType="{x:Type Thumb}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border SnapsToDevicePixels="True"
                            Background="Transparent"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="0,0,0,0">
                        <Rectangle>
                            <Rectangle.Fill>
                                <DrawingBrush TileMode="Tile"
                                              Viewbox="0,0,4,4"
                                              ViewboxUnits="Absolute"
                                              Viewport="0,0,4,4"
                                              ViewportUnits="Absolute">
                                    <DrawingBrush.Drawing>
                                        <DrawingGroup>
                                            <GeometryDrawing Brush="White"
                                                             Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z" />
                                            <GeometryDrawing Brush="{StaticResource ToolBarGripper}"
                                                             Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z" />
                                        </DrawingGroup>
                                    </DrawingBrush.Drawing>
                                </DrawingBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Cursor"
                                    Value="SizeAll" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ToolBarToggleButtonVerticalBackground"
                         EndPoint="1,0"
                         StartPoint="0,0">
        <GradientStop Color="#ECECEC"
                      Offset="0" />
        <GradientStop Color="#DDDDDD"
                      Offset="0.5" />
        <GradientStop Color="#A0A0A0"
                      Offset="1" />
    </LinearGradientBrush>
    <Style x:Key="ToolBarVerticalOverflowButtonStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Background"
                Value="{StaticResource ToolBarToggleButtonVerticalBackground}" />
        <Setter Property="MinHeight"
                Value="0" />
        <Setter Property="MinWidth"
                Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border SnapsToDevicePixels="true"
                            x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            CornerRadius="0,0,3,3">
                        <Canvas SnapsToDevicePixels="true"
                                HorizontalAlignment="Right"
                                Margin="2,7,2,2"
                                VerticalAlignment="Bottom"
                                Width="7"
                                Height="6">
                            <Path Stroke="White"
                                  Data="M 1.5 1 L 1.5 6" />
                            <Path Stroke="{TemplateBinding Foreground}"
                                  Data="M 0.5 0 L 0.5 5" />
                            <Path Fill="White"
                                  Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" />
                            <Path Fill="{TemplateBinding Foreground}"
                                  Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" />
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource ToolBarGripper}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ToolBarVerticalBackground"
                         EndPoint="1,0"
                         StartPoint="0,0">
        <GradientStop Color="#FFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFFBFF"
                      Offset="0.5" />
        <GradientStop Color="#F7F7F7"
                      Offset="1" />
    </LinearGradientBrush>
    <Style TargetType="{x:Type ToolBar}">
        <Setter Property="Background"
                Value="{StaticResource ToolBarHorizontalBackground}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolBar}">
                    <Grid SnapsToDevicePixels="true"
                          Margin="3,1,1,1"
                          x:Name="Grid">
                        <Grid HorizontalAlignment="Right"
                              x:Name="OverflowGrid">
                            <ToggleButton IsEnabled="{TemplateBinding HasOverflowItems}"
                                          FocusVisualStyle="{x:Null}"
                                          x:Name="OverflowButton"
                                          Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}"
                                          ClickMode="Press"
                                          IsChecked="{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <Popup Focusable="false"
                                   AllowsTransparency="true"
                                   IsOpen="{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                   Placement="Bottom"
                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                                   StaysOpen="False"
                                   x:Name="OverflowPopup">
                                <Border x:Name="Shdw">
                                    <Border BorderThickness="1,1,1,1"
                                            Background="{DynamicResource LightBrush}"
                                            BorderBrush="{DynamicResource LightBrush}">
                                        <ToolBarOverflowPanel Focusable="true"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                              FocusVisualStyle="{x:Null}"
                                                              Margin="2"
                                                              x:Name="PART_ToolBarOverflowPanel"
                                                              WrapWidth="200"
                                                              KeyboardNavigation.DirectionalNavigation="Cycle"
                                                              KeyboardNavigation.TabNavigation="Cycle" />
                                    </Border>
                                </Border>
                            </Popup>
                        </Grid>
                        <Border Margin="0,0,11,0"
                                x:Name="MainPanelBorder"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="0,0,0,0"
                                Padding="{TemplateBinding Padding}"
                                Background="{DynamicResource NormalBorderBrush}">
                            <Grid>

                                <DockPanel KeyboardNavigation.TabIndex="1"
                                           KeyboardNavigation.TabNavigation="Local">
                                    <Thumb Padding="6,5,1,6"
                                           Margin="-3,-1,0,0"
                                           x:Name="ToolBarThumb"
                                           Style="{StaticResource ToolBarThumbStyle}"
                                           Width="10" />
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      HorizontalAlignment="Center"
                                                      Margin="4,0,4,0"
                                                      x:Name="ToolBarHeader"
                                                      VerticalAlignment="Center"
                                                      ContentSource="Header" />
                                    <ToolBarPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                  Margin="0,1,2,2"
                                                  x:Name="PART_ToolBarPanel"
                                                  IsItemsHost="true"
                                                  Background="{DynamicResource NormalBrush}" />
                                </DockPanel>
                                <Rectangle IsHitTestVisible="False"
                                           Opacity="0.15"
                                           VerticalAlignment="Top"
                                           Height="13.995"
                                           Grid.ColumnSpan="1"
                                           Margin="0,0,2,0">
                                    <Rectangle.Fill>
                                        <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsOverflowOpen"
                                 Value="true">
                            <Setter Property="IsEnabled"
                                    TargetName="ToolBarThumb"
                                    Value="false" />
                        </Trigger>
                        <Trigger Property="Header"
                                 Value="{x:Null}">
                            <Setter Property="Visibility"
                                    TargetName="ToolBarHeader"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="ToolBarTray.IsLocked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="ToolBarThumb"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="HasDropShadow"
                                 SourceName="OverflowPopup"
                                 Value="true">
                            <Setter Property="Margin"
                                    TargetName="Shdw"
                                    Value="0,0,5,5" />
                            <Setter Property="SnapsToDevicePixels"
                                    TargetName="Shdw"
                                    Value="true" />
                            <Setter Property="Background"
                                    TargetName="Shdw"
                                    Value="#71000000" />
                        </Trigger>
                        <Trigger Property="Orientation"
                                 Value="Vertical">
                            <Setter Property="Margin"
                                    TargetName="Grid"
                                    Value="1,3,1,1" />
                            <Setter Property="Style"
                                    TargetName="OverflowButton"
                                    Value="{StaticResource ToolBarVerticalOverflowButtonStyle}" />
                            <Setter Property="Height"
                                    TargetName="ToolBarThumb"
                                    Value="10" />
                            <Setter Property="Width"
                                    TargetName="ToolBarThumb"
                                    Value="Auto" />
                            <Setter Property="Margin"
                                    TargetName="ToolBarThumb"
                                    Value="-1,-3,0,0" />
                            <Setter Property="Padding"
                                    TargetName="ToolBarThumb"
                                    Value="5,6,6,1" />
                            <Setter Property="Margin"
                                    TargetName="ToolBarHeader"
                                    Value="0,0,0,4" />
                            <Setter Property="Margin"
                                    TargetName="PART_ToolBarPanel"
                                    Value="1,0,2,2" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ToolBarThumb"
                                    Value="Top" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ToolBarHeader"
                                    Value="Top" />
                            <Setter Property="HorizontalAlignment"
                                    TargetName="OverflowGrid"
                                    Value="Stretch" />
                            <Setter Property="VerticalAlignment"
                                    TargetName="OverflowGrid"
                                    Value="Bottom" />
                            <Setter Property="Placement"
                                    TargetName="OverflowPopup"
                                    Value="Right" />
                            <Setter Property="Margin"
                                    TargetName="MainPanelBorder"
                                    Value="0,0,0,11" />
                            <Setter Property="Background"
                                    Value="{StaticResource ToolBarVerticalBackground}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{DynamicResource TextBrush}" />
    </Style>

</ResourceDictionary>